mirror of
https://github.com/rancher/os.git
synced 2025-09-16 23:21:19 +00:00
Early cloud-init
This commit is contained in:
20
tests/cloud_init_test.go
Normal file
20
tests/cloud_init_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package integration
|
||||
|
||||
import . "gopkg.in/check.v1"
|
||||
|
||||
func (s *QemuSuite) TestReadDatasourcesFromDisk(c *C) {
|
||||
s.RunQemu(c)
|
||||
|
||||
s.CheckCall(c, `
|
||||
sudo tee /var/lib/rancher/conf/cloud-config.d/datasources.yml << EOF
|
||||
rancher:
|
||||
cloud_init:
|
||||
datasources:
|
||||
- url:https://gist.githubusercontent.com/joshwget/e1c49f8b1ddeeba01bc9d0a3be01ed60/raw/9168b380fde182d53acea487d49b680648a0ca5b/gistfile1.txt
|
||||
EOF
|
||||
`)
|
||||
|
||||
s.Reboot(c)
|
||||
|
||||
s.CheckCall(c, "sudo ros config get rancher.log | grep true")
|
||||
}
|
@@ -4,7 +4,7 @@ import . "gopkg.in/check.v1"
|
||||
|
||||
func (s *QemuSuite) TestNetworkFromUrl(c *C) {
|
||||
netArgs := []string{"-net", "nic,vlan=0,model=virtio"}
|
||||
args := []string{"--cloud-config", "./tests/assets/test_10/cloud-config.yml"}
|
||||
args := []string{"--append", "rancher.cloud_init.datasources=[url:https://gist.githubusercontent.com/joshwget/0bdc616cd26162ad87c535644c8b1ef6/raw/8cce947c08cf006e932b71d92ddbb96bae8e3325/gistfile1.txt]"}
|
||||
for i := 0; i < 7; i++ {
|
||||
args = append(args, netArgs...)
|
||||
}
|
||||
|
Reference in New Issue
Block a user