func TestInvokeInit(t *testing.T) { assert := assert.New(t) exe := justCommand(t, []string{`sous`, `init`}) init := exe.Cmd.(*SousInit) assert.NotNil(init) assert.False(init.Flags.IgnoreOTPLDeploy) assert.False(init.Flags.IgnoreOTPLDeploy) }
func TestVolumesEqual(t *testing.T) { //Log.Vomit.SetOutput(os.Stderr) //Log.Debug.SetOutput(os.Stderr) assert := assert.New(t) vs := []vpair{ vpair{Volumes{&Volume{"a", "a", "RO"}, &Volume{"a", "a", "RO"}}, 1}, vpair{Volumes{&Volume{"a", "a", "RO"}, &Volume{"a", "a", "RO"}}, 1}, vpair{Volumes{&Volume{"a", "a", "RO"}}, 4}, vpair{Volumes{&Volume{"a", "b", "RO"}, &Volume{"a", "a", "RO"}}, 2}, vpair{Volumes{&Volume{"a", "a", "RW"}, &Volume{"a", "a", "RO"}}, 3}, } for _, l := range vs { for _, r := range vs { if l.i == r.i { assert.True(l.v.Equal(r.v)) } else { assert.False(l.v.Equal(r.v)) } } } }
// False asserts that the specified value is false. // // assert.False(t, myBool, "myBool should be false") // // Returns whether the assertion was successful (true) or not (false). func False(t TestingT, value bool, msgAndArgs ...interface{}) { if !assert.False(t, value, msgAndArgs...) { t.FailNow() } }