summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-18 21:34:25 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-03-18 21:34:25 -0500
commitf04b3f589d7800653b9fb3ad08131f4edd2e2828 (patch)
tree1b18c37b79fa0c7a1d67dee441bcef51ece0cb0c /tests
parentbbe669b761db4cb03fca2dbf9a7890d5a7e120af (diff)
downloadhorizon-f04b3f589d7800653b9fb3ad08131f4edd2e2828.tar.gz
horizon-f04b3f589d7800653b9fb3ad08131f4edd2e2828.tar.bz2
horizon-f04b3f589d7800653b9fb3ad08131f4edd2e2828.tar.xz
horizon-f04b3f589d7800653b9fb3ad08131f4edd2e2828.zip
hscript: Support creation of /etc/network/interfaces
Diffstat (limited to 'tests')
-rw-r--r--tests/fixtures/0227-netconfigtype-eni.installfile4
-rw-r--r--tests/spec/simulator_spec.rb10
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/fixtures/0227-netconfigtype-eni.installfile b/tests/fixtures/0227-netconfigtype-eni.installfile
index 2eb6712..e5beb22 100644
--- a/tests/fixtures/0227-netconfigtype-eni.installfile
+++ b/tests/fixtures/0227-netconfigtype-eni.installfile
@@ -1,8 +1,8 @@
-hostname horizon-netifrc-test
+hostname horizon-eni-test
rootpw $6$gumtLGmHwOVIRpQR$2M9PUO24hy5mofzWWf9a.YLbzOgOlUby1g0hDj.wG67E2wrrvys59fq02PPdxBdbgkLZFtjfEx6MHZwMBamwu/
network true
netconfigtype eni
-netaddress eth0 dhcp
+netaddress eth0 static 192.168.1.2 24 192.168.1.1
netaddress eth0 slaac
nameserver 9.9.9.10
diskid /dev/sda QEMU_HARDDISK
diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb
index 66f1d8f..9d41356 100644
--- a/tests/spec/simulator_spec.rb
+++ b/tests/spec/simulator_spec.rb
@@ -213,6 +213,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
end
context "simulating 'nameserver' execution" do
it "configures nameservers correctly" do