|
76 | 76 | it 'should execute only ipa commands and report local env + connected status' do |
77 | 77 | expect(File).to receive(:exist?).with('/etc/ipa/default.conf').and_return(true) |
78 | 78 | expect(File).to receive(:read).with('/etc/ipa/default.conf').and_return(default_conf) |
79 | | - expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist') |
| 79 | + expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist -s') |
80 | 80 | allow_any_instance_of(Process::Status).to receive(:success?).and_return(true) |
81 | 81 | expect(Facter::Core::Execution).to receive(:execute).with(ipa_env_query, ipa_query_options).and_return(ipa_env) |
82 | 82 | expect(Facter::Core::Execution).to receive(:execute).with(ipa_env_server_query, ipa_query_options).and_return(ipa_server_env) |
|
94 | 94 | it 'should execute kinit + ipa commands and return local env + connected status' do |
95 | 95 | expect(File).to receive(:exist?).with('/etc/ipa/default.conf').and_return(true) |
96 | 96 | expect(File).to receive(:read).with('/etc/ipa/default.conf').and_return(default_conf) |
97 | | - expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist') |
| 97 | + expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist -s') |
98 | 98 | allow_any_instance_of(Process::Status).to receive(:success?).and_return(false) |
99 | 99 | expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/kinit -k 2>&1', kinit_query_options).and_return('') |
100 | 100 | expect(Facter::Core::Execution).to receive(:execute).with( ipa_env_query, ipa_query_options).and_return(ipa_env) |
|
114 | 114 | it 'should return defaults from /etc/ipa/default.conf and disconnected status' do |
115 | 115 | expect(File).to receive(:exist?).with('/etc/ipa/default.conf').and_return(true) |
116 | 116 | expect(File).to receive(:read).with('/etc/ipa/default.conf').and_return(default_conf) |
117 | | - expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist') |
| 117 | + expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/klist -s') |
118 | 118 | allow_any_instance_of(Process::Status).to receive(:success?).and_return(false) |
119 | 119 | expect(Facter::Core::Execution).to receive(:execute).with('/usr/bin/kinit -k 2>&1', kinit_query_options).and_return('some error message') |
120 | 120 | expect(Facter::Core::Execution).to receive(:execute).with(ipa_env_query, ipa_query_options).and_return('') |
|
0 commit comments