Skip to content

Commit a263608

Browse files
committed
(PUP-11764) Convert invalid_module_install_path
1 parent d2a62aa commit a263608

File tree

2 files changed

+20
-20
lines changed

2 files changed

+20
-20
lines changed

acceptance/tests/modules/changes/invalid_module_install_path.rb

Lines changed: 0 additions & 20 deletions
This file was deleted.

spec/integration/application/module_spec.rb

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,4 +100,24 @@
100100
.and output(Regexp.new("└── pmtacceptance-nginx".encode(Encoding.default_external), Regexp::MULTILINE)).to_stdout
101101
end
102102
end
103+
104+
context 'changes' do
105+
it 'reports an error when the install path is invalid' do
106+
Puppet.initialize_settings(['-E', 'direnv'])
107+
Puppet[:color] = false
108+
Puppet[:environmentpath] = File.join(my_fixture_dir, 'environments')
109+
dir = tmpdir('module_changes')
110+
111+
pattern = Regexp.new([
112+
%Q{.*Error: Could not find a valid module at "#{dir}/nginx".*},
113+
%Q{.*Error: Try 'puppet help module changes' for usage.*},
114+
].join("\n"), Regexp::MULTILINE)
115+
116+
expect {
117+
app.command_line.args = ['changes', File.join(dir, 'nginx')]
118+
app.run
119+
}.to exit_with(1)
120+
.and output(pattern).to_stderr
121+
end
122+
end
103123
end

0 commit comments

Comments
 (0)