github.com/bdwilliams/libcompose@v0.3.1-0.20160826154243-d81a9bdacff0/integration/restart_test.go (about) 1 package integration 2 3 import ( 4 "fmt" 5 6 . "gopkg.in/check.v1" 7 ) 8 9 func (s *CliSuite) TestRestart(c *C) { 10 p := s.ProjectFromText(c, "up", SimpleTemplate) 11 12 name := fmt.Sprintf("%s_%s_1", p, "hello") 13 cn := s.GetContainerByName(c, name) 14 c.Assert(cn, NotNil) 15 16 c.Assert(cn.State.Running, Equals, true) 17 time := cn.State.StartedAt 18 19 s.FromText(c, p, "restart", SimpleTemplate) 20 21 cn = s.GetContainerByName(c, name) 22 c.Assert(cn, NotNil) 23 c.Assert(cn.State.Running, Equals, true) 24 25 c.Assert(time, Not(Equals), cn.State.StartedAt) 26 }