summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-09 08:59:15 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-02-09 08:59:15 -0600
commit72f84dd3dd00e792083906dbf50828c9b00d0221 (patch)
treeed0cca45d070bf8c8cb1f26f3ff1be99c3075a38 /tests
parentabc0d2c1d6c187ca89e3a747c1471134ee1fd581 (diff)
downloadhorizon-72f84dd3dd00e792083906dbf50828c9b00d0221.tar.gz
horizon-72f84dd3dd00e792083906dbf50828c9b00d0221.tar.bz2
horizon-72f84dd3dd00e792083906dbf50828c9b00d0221.tar.xz
horizon-72f84dd3dd00e792083906dbf50828c9b00d0221.zip
tests: Add test for IPv4 subnet -> CIDR conversion
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/simulator_spec.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/spec/simulator_spec.rb b/tests/spec/simulator_spec.rb
index 67177c2..b3b24c9 100644
--- a/tests/spec/simulator_spec.rb
+++ b/tests/spec/simulator_spec.rb
@@ -184,12 +184,18 @@ printf '%s\\t%s\\t%s\\t%s\\t0\\t0\\n' /dev/gwyn/source /usr/src auto noatime >>
end
end
context "simulating 'netaddress' execution" do
- it "configures addressing correctly" do
+ it "configures IPv6 addressing correctly" do
use_fixture '0042-netaddress-valid-static6.installfile'
run_simulate
# The end quote is missing deliberately.
expect(last_command_started.stdout).to include('config_eth0="2600:1702:2a80:1b9f:5bbc:af4c:5dd1:a183/64')
end
+ it "configures IPv4 addressing correctly" do
+ use_fixture '0041-netaddress-valid-static4.installfile'
+ run_simulate
+ # The end quote is missing deliberately.
+ expect(last_command_started.stdout).to include('config_eth0="172.16.1.11/16')
+ end
it "configures routing correctly" do
use_fixture '0048-netaddress-gateway4.installfile'
run_simulate