func TestSystemGetBadStack(t *testing.T) { provider := StubAwsProvider( cycleDescribeStacksNotFound("convox"), ) defer provider.Close() r, err := provider.SystemGet() assert.Nil(t, r) assert.Equal(t, aws.ErrorNotFound("convox not found"), err) }
func TestFormationListBadApp(t *testing.T) { provider := StubAwsProvider( cycleDescribeStacksNotFound("convox-httpe"), ) defer provider.Close() r, err := provider.FormationList("httpe") assert.Nil(t, r) assert.Equal(t, aws.ErrorNotFound("httpe not found"), err) }
func TestFormationListBadRelease(t *testing.T) { provider := StubAwsProvider( cycleFormationDescribeStacks, cycleFormationDescribeStacks, cycleReleaseGetItemNotFound, ) defer provider.Close() r, err := provider.FormationList("httpd") assert.Nil(t, r) assert.Equal(t, aws.ErrorNotFound("no such release: RVFETUHHKKD"), err) }
func TestFormationSaveBadApp(t *testing.T) { provider := StubAwsProvider( cycleDescribeStacksNotFound("convox-httpe"), ) defer provider.Close() pf := &structs.ProcessFormation{ Name: "web", Count: 1, Memory: 512, CPU: 256, } err := provider.FormationSave("httpe", pf) assert.Equal(t, aws.ErrorNotFound("httpe not found"), err) }
func TestFormationSaveBadCluster(t *testing.T) { provider := StubAwsProvider( cycleFormationDescribeStacks, cycleCapacityListContainerInstancesBadCluster, ) defer provider.Close() pf := &structs.ProcessFormation{ Name: "web", Count: 1, Memory: 512, CPU: 256, } err := provider.FormationSave("httpd", pf) assert.Equal(t, aws.ErrorNotFound("cluster not found: cluster-test"), err) }