Skip to content

Commit 8194485

Browse files
committed
Start integration test for hiera 5
1 parent a0a0471 commit 8194485

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
version: 5
3+
defaults:
4+
datadir: hieradata
5+
data_hash: yaml_data
6+
7+
hierarchy:
8+
- name: "Default structure data"
9+
path: "nodes/%{app}.yaml"
10+
11+
- name: "Special data"
12+
path: "%{app}.yaml"
13+
datadir: "special"
14+
15+
- name: "Common data"
16+
path: "common.yaml"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# frozen_string_literal: true
2+
3+
require_relative 'integration_helper'
4+
5+
describe 'repository with hiera 5' do
6+
context 'with --hiera-path and per-item data directory' do
7+
it 'should fail because per-item datadir is not supported with --hiera-path' do
8+
argv = ['-n', 'rspec-node.github.net']
9+
hash = { hiera_config: 'config/hiera5-global.yaml', spec_fact_file: 'facts.yaml', spec_repo: 'hiera5' }
10+
result = OctocatalogDiff::Integration.integration(hash.merge(argv: argv))
11+
expect(result.exitcode).to eq(-1), OctocatalogDiff::Integration.format_exception(result)
12+
expect(result.exception).to be_a_kind_of(ArgumentError)
13+
expect(result.exception.message).to match(/Hierarchy item .+ has a datadir/)
14+
end
15+
end
16+
end

0 commit comments

Comments
 (0)