cloud_init_test.go 668 B

12345678910111213141516171819202122232425262728293031
  1. package integration
  2. import . "gopkg.in/check.v1"
  3. func (s *QemuSuite) TestReadDatasourcesFromDisk(c *C) {
  4. s.RunQemu(c)
  5. s.CheckCall(c, `
  6. sudo tee /var/lib/rancher/conf/cloud-config.d/datasources.yml << EOF
  7. rancher:
  8. cloud_init:
  9. datasources:
  10. - url:https://gist.githubusercontent.com/joshwget/e1c49f8b1ddeeba01bc9d0a3be01ed60/raw/9168b380fde182d53acea487d49b680648a0ca5b/gistfile1.txt
  11. EOF
  12. `)
  13. s.Reboot(c)
  14. s.CheckCall(c, "sudo ros config get rancher.log | grep true")
  15. }
  16. func (s *QemuSuite) TestIsoCloudConfig(c *C) {
  17. runArgs := []string{
  18. "--fresh",
  19. "--cloud-config-iso",
  20. }
  21. s.RunQemuWith(c, runArgs...)
  22. s.CheckCall(c, `ls .ssh/authorized_keys`)
  23. }