summaryrefslogtreecommitdiff
path: root/tests/spec/simulator_spec.rb
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-17 03:16:23 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-05-17 03:16:23 -0500
commitf9c5732721d179ab682d08faa9d30d6b711957bf (patch)
tree07f09361f104ca538c0b3bb8354be0f2d0d2399d /tests/spec/simulator_spec.rb
parent1cf51675a55fecf1f5c2d5bd3e14748eae182489 (diff)
downloadhorizon-f9c5732721d179ab682d08faa9d30d6b711957bf.tar.gz
horizon-f9c5732721d179ab682d08faa9d30d6b711957bf.tar.bz2
horizon-f9c5732721d179ab682d08faa9d30d6b711957bf.tar.xz
horizon-f9c5732721d179ab682d08faa9d30d6b711957bf.zip
tests: Add --version tests, fix required installfile tests
Diffstat (limited to 'tests/spec/simulator_spec.rb')
-rw-r--r--tests/spec/simulator_spec.rb26
1 files changed, 15 insertions, 11 deletions
diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb
index 60e0186..ab77782 100644
--- a/tests/spec/simulator_spec.rb
+++ b/tests/spec/simulator_spec.rb
@@ -8,12 +8,16 @@ RSpec.describe 'HorizonScript Simulator', :type => :aruba do
context "argument passing" do
it "requires an installfile to be specified" do
run_command 'hscript-simulate'
- expect(last_command_started).to have_output(/Allowed options/)
+ expect(last_command_started).to have_output(/must specify an installfile/)
end
it "supports Strict Mode" do
run_command 'hscript-simulate foo -s'
expect(last_command_started).to_not have_output(/Allowed options/)
end
+ it "supports version output" do
+ run_command 'hscript-simulate --version'
+ expect(last_command_started).to_not have_output(/Allowed options/)
+ end
it "doesn't output ANSI colours when instructed not to" do
run_command 'hscript-simulate foo -n'
expect(last_command_started).to_not have_output(/\033/)
@@ -213,16 +217,16 @@ printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >>
run_simulate
expect(last_command_started.stdout).to include("ln -s /etc/init.d/net.lo /target/etc/init.d/net.eth0")
end
- it "configures IPv4 addressing correctly with eni" do
- use_fixture '0227-netconfigtype-eni.installfile'
- run_simulate
- expect(last_command_started.stdout).to include("auto eth0\niface eth0 inet static")
- end
- it "configures IPv6 SLAAC addressing correctly with eni" do
- use_fixture '0227-netconfigtype-eni.installfile'
- run_simulate
- expect(last_command_started.stdout).to include("iface eth0 inet6 manual")
- end
+ it "configures IPv4 addressing correctly with eni" do
+ use_fixture '0227-netconfigtype-eni.installfile'
+ run_simulate
+ expect(last_command_started.stdout).to include("auto eth0\niface eth0 inet static")
+ end
+ it "configures IPv6 SLAAC addressing correctly with eni" do
+ use_fixture '0227-netconfigtype-eni.installfile'
+ run_simulate
+ expect(last_command_started.stdout).to include("iface eth0 inet6 manual")
+ end
end
context "simulating 'nameserver' execution" do
it "configures nameservers correctly" do