Skip to content

Commit a2778b3

Browse files
committed
fixing integration tests
1 parent 1f73816 commit a2778b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

integration/client_delete_serviceInstance_test.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func deleteServiceInstance(t *testing.T, sid, namespace string) {
148148
cmd := exec.Command("oc", args...)
149149
output, err := cmd.CombinedOutput()
150150
if err != nil {
151-
t.Fatalf("Failed to delete service instance %s: %v, with output %v", sid, err, output)
151+
t.Fatalf("Failed to delete service instance %s: %v, with output %v", sid, err, string(output))
152152
}
153153
}
154154

@@ -186,6 +186,9 @@ func getInstance(si *ProvisionServiceParams) (instance *v1beta1.ServiceInstance,
186186
return nil, err
187187
}
188188

189+
if len(siList.Items) == 0 {
190+
return nil, errors.New("no matching instances found")
191+
}
189192
return &siList.Items[0], nil
190193
}
191194

integration/service_integration_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func TestIntegration(t *testing.T) {
139139
func CreateInstance(t *testing.T, si *ProvisionServiceParams) {
140140
args := []string{"create", "serviceinstance", si.ServiceName, si.Namespace}
141141
args = append(args, si.Params...)
142+
t.Logf("executing: %v\n", *executable+strings.Join(args, " "))
142143
cmd := exec.Command(*executable, args...)
143144

144145
output, err := cmd.CombinedOutput()

0 commit comments

Comments
 (0)