Skip to content

Commit

Permalink
fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philbrookes committed Feb 16, 2018
1 parent b20f69e commit f1ccd4c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion integration/client_delete_serviceInstance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func deleteServiceInstance(t *testing.T, sid, namespace string) {
cmd := exec.Command("oc", args...)
output, err := cmd.CombinedOutput()
if err != nil {
t.Fatalf("Failed to delete service instance %s: %v, with output %v", sid, err, output)
t.Fatalf("Failed to delete service instance %s: %v, with output %v", sid, err, string(output))
}
}

Expand Down Expand Up @@ -186,6 +186,9 @@ func getInstance(si *ProvisionServiceParams) (instance *v1beta1.ServiceInstance,
return nil, err
}

if len(siList.Items) == 0 {
return nil, errors.New("no matching instances found")
}
return &siList.Items[0], nil
}

Expand Down
1 change: 1 addition & 0 deletions integration/service_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ func TestIntegration(t *testing.T) {
func CreateInstance(t *testing.T, si *ProvisionServiceParams) {
args := []string{"create", "serviceinstance", si.ServiceName, si.Namespace}
args = append(args, si.Params...)
t.Logf("executing: %v\n", *executable+strings.Join(args, " "))
cmd := exec.Command(*executable, args...)

output, err := cmd.CombinedOutput()
Expand Down
1 change: 0 additions & 1 deletion integration/validatedCommandUtils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ type ValidationResult struct {
}

func (v ValidationResult) Test(t *testing.T) (output []byte, err error) {
t.Log(fmt.Sprintf("%s\n", v.Output))
if !v.Success {
t.Fatal(v.Message)
}
Expand Down

0 comments on commit f1ccd4c

Please sign in to comment.