network_from_url_test.go 957 B

1234567891011121314151617181920212223242526272829303132333435
  1. package integration
  2. import . "gopkg.in/check.v1"
  3. func (s *QemuSuite) TestNetworkFromUrl(c *C) {
  4. netArgs := []string{"-net", "nic,vlan=0,model=virtio"}
  5. args := []string{"--append", "rancher.debug=true rancher.password=test-me rancher.cloud_init.datasources=[url:https://gist.githubusercontent.com/joshwget/0bdc616cd26162ad87c535644c8b1ef6/raw/8cce947c08cf006e932b71d92ddbb96bae8e3325/gistfile1.txt]"}
  6. for i := 0; i < 7; i++ {
  7. args = append(args, netArgs...)
  8. }
  9. s.RunQemu(c, args...)
  10. s.CheckCall(c, `
  11. cat > test-merge << "SCRIPT"
  12. set -x -e
  13. ip link show dev br0
  14. ip link show dev br0.100 | grep br0.100@br0
  15. ip link show dev eth1.100 | grep 'master br0'
  16. SCRIPT
  17. sudo bash test-merge`)
  18. s.CheckCall(c, `
  19. cat > test-merge << "SCRIPT"
  20. set -x -e
  21. cat /etc/resolv.conf | grep "search mydomain.com example.com"
  22. cat /etc/resolv.conf | grep "nameserver 208.67.222.123"
  23. cat /etc/resolv.conf | grep "nameserver 208.67.220.123"
  24. SCRIPT
  25. sudo bash test-merge`)
  26. }