Beispiel #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)
}
Beispiel #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")
}