예제 #1
0
func TestHasApplicationInvalid(t *testing.T) {
	s := mockrest.StartNewWithStatusCode(404)
	defer s.Stop()

	c := NewMarathonClient(s.URL, "", "")
	ok, _ := c.HasApplication("/storage/redis-invalid")

	assert.Equal(t, false, ok)
}
예제 #2
0
func TestCreateApplicationInvalidAppId(t *testing.T) {
	s := mockrest.StartNewWithStatusCode(422)
	defer s.Stop()

	c := NewMarathonClient(s.URL, "", "")
	_, err := c.CreateApplication(NewApplication("/someapp"), false, false)

	assert.NotNil(t, err, "Expecting Error")
}