diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-06 00:57:00 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-11-06 00:57:00 -0600 |
commit | ada546b6002360169570a72c83fadc574b936c18 (patch) | |
tree | 85305bc68600abdfbbc743eea8622537b5379bad /tests | |
parent | ed351160f94bfff12fadbceb44a2f85604dfb957 (diff) | |
download | horizon-ada546b6002360169570a72c83fadc574b936c18.tar.gz horizon-ada546b6002360169570a72c83fadc574b936c18.tar.bz2 horizon-ada546b6002360169570a72c83fadc574b936c18.tar.xz horizon-ada546b6002360169570a72c83fadc574b936c18.zip |
hscript: Implement Runner.Execute.netaddress.OpenRC
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fixtures/0200-netaddress-openrc.installfile | 6 | ||||
-rw-r--r-- | tests/spec/simulator_spec.rb | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/tests/fixtures/0200-netaddress-openrc.installfile b/tests/fixtures/0200-netaddress-openrc.installfile new file mode 100644 index 0000000..5d3aee4 --- /dev/null +++ b/tests/fixtures/0200-netaddress-openrc.installfile @@ -0,0 +1,6 @@ +network true +netaddress eth0 static 2600:1702:2a80:1b9f:5bbc:af4c:5dd1:a183 64 +hostname test.machine.internal +pkginstall adelie-base openrc s6-linux-init netifrc +rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/ +mount /dev/sda1 / diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb index d46c87c..be684a1 100644 --- a/tests/spec/simulator_spec.rb +++ b/tests/spec/simulator_spec.rb @@ -174,6 +174,16 @@ printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >> # The end quote is missing deliberately. expect(last_command_started.stdout).to include('routes_eth0="default via 172.16.1.1') end + it "doesn't perform OpenRC configuration when netifrc isn't installed" do + use_fixture '0042-netaddress-valid-static6.installfile' + run_simulate + expect(last_command_started.stdout).to_not include ("/target/etc/init.d/net") + end + it "performs OpenRC configuration when netifrc is installed" do + use_fixture '0200-netaddress-openrc.installfile' + run_simulate + expect(last_command_started.stdout).to include("ln -s /etc/init.d/net.lo /target/etc/init.d/net.eth0") + end end context "simulating 'nameserver' execution" do it "configures nameservers correctly" do |