File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed
fixtures/repos/hiera5/config Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change
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"
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments