diff options
author | Tim Smith <tsmith84@gmail.com> | 2020-10-19 11:29:29 -0700 |
---|---|---|
committer | Tim Smith <tsmith84@gmail.com> | 2020-10-19 12:27:10 -0700 |
commit | 62e85f394a2b0068297114ec862de4336fa57c13 (patch) | |
tree | 16f39e1b2baee2016eac84563f17d3aa742bd307 /kitchen-tests | |
parent | c65bbb1871bff526b3b7b2b1649ccc11bd4b8de3 (diff) | |
download | chef-62e85f394a2b0068297114ec862de4336fa57c13.tar.gz |
Test ifconfig in Test Kitchen and add examples to the resourcetest_ifconfig
We lacked an actual test of this resource. Let's see if it works.
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'kitchen-tests')
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb | 13 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/linux.rb | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb new file mode 100644 index 0000000000..149b2cb65c --- /dev/null +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_ifconfig.rb @@ -0,0 +1,13 @@ +execute "create virtual interface for testing" do + command "ifconfig eth0:0 123.123.22.22" +end + +ifconfig "33.33.33.80" do + bootproto "dhcp" + device "eth0:0" +end + +ifconfig "Set eth1 to DHCP" do + device "eth0:0" + bootproto "dhcp" +end
\ No newline at end of file diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 0d560b09bd..8991cf1594 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -123,6 +123,7 @@ include_recipe "::_ohai_hint" include_recipe "::_openssl" include_recipe "::_tests" include_recipe "::_mount" +include_recipe "::_ifconfig" # at the moment these do not run properly in docker # we need to investigate if this is a snap on docker issue or a chef issue |