1
0
mirror of https://github.com/rancher/os.git synced 2025-07-12 14:18:01 +00:00

Add tests for when state fails to mount

This commit is contained in:
Josh Curl 2016-10-11 15:30:00 -07:00
parent 9654e4eaad
commit a90d93691f
No known key found for this signature in database
GPG Key ID: 82B504B9BCCFA677

15
tests/bad_state_test.go Normal file
View File

@ -0,0 +1,15 @@
package integration
import . "gopkg.in/check.v1"
func (s *QemuSuite) TestBadState(c *C) {
err := s.RunQemu("--no-format", "--append", "rancher.state.dev=LABEL=BAD_STATE")
c.Assert(err, IsNil)
s.CheckCall(c, "mount | grep /var/lib/docker | grep rootfs")
}
func (s *QemuSuite) TestBadStateWithWait(c *C) {
err := s.RunQemu("--no-format", "--append", "rancher.state.dev=LABEL=BAD_STATE", "--append", "rancher.state.wait")
c.Assert(err, IsNil)
s.CheckCall(c, "mount | grep /var/lib/docker | grep rootfs")
}