12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- package integration
- import . "gopkg.in/check.v1"
- func (s *QemuSuite) TestRosConfig(c *C) {
- s.RunQemu(c, "--cloud-config", "./tests/assets/test_14/cloud-config.yml")
- s.CheckCall(c, `
- set -x -e
- if [ "$(sudo ros config get hostname)" == "hostname3
- " ]; then
- sudo ros config get hostname
- exit 1
- fi
- sudo ros config set hostname rancher-test
- if [ "$(sudo ros config get hostname)" == "rancher-test
- " ]; then
- sudo ros config get hostname
- exit 1
- fi`)
- s.CheckCall(c, `
- set -x -e
- if [ "$(sudo ros config get rancher.log)" == "true
- " ]; then
- sudo ros config get rancher.log
- exit 1
- fi
- sudo ros config set rancher.log false
- if [ "$(sudo ros config get rancher.log)" == "false
- " ]; then
- sudo ros config get rancher.log
- exit 1
- fi
- if [ "$(sudo ros config get rancher.debug)" == "false
- " ]; then
- sudo ros config get rancher.debug
- exit 1
- fi
- sudo ros config set rancher.debug true
- if [ "$(sudo ros config get rancher.debug)" == "true
- " ]; then
- sudo ros config get rancher.debug
- exit 1
- fi`)
- s.CheckCall(c, `
- set -x -e
- sudo ros config set rancher.network.dns.search '[a,b]'
- if [ "$(sudo ros config get rancher.network.dns.search)" == "- a
- - b
- " ]; then
- sudo ros config get rancher.network.dns.search
- exit 1
- fi
- sudo ros config set rancher.network.dns.search '[]'
- if [ "$(sudo ros config get rancher.network.dns.search)" == "[]
- " ]; then
- sudo ros config get rancher.network.dns.search
- exit 1
- fi`)
- s.CheckCall(c, `
- set -x -e
- if sudo ros config export | grep "PRIVATE KEY"; then
- exit 1
- fi
- sudo ros config export --private | grep "PRIVATE KEY"
- sudo ros config export --full | grep "udev"
- sudo ros config export --private --full | grep "ntp"
- sudo ros config export --full | grep "labels"
- sudo ros config export --private --full | grep "PRIVATE KEY"`)
- }
|