Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix default namespace fallback #209

Merged
merged 4 commits into from
Sep 22, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix lint error
Signed-off-by: John Starich <johnstarich@johnstarich.com>
JohnStarich committed Sep 22, 2020

Verified

This commit was signed with the committer’s verified signature.
JohnStarich John Starich
commit 3a87057e6010d75bef725feb57e72e15fcadd379
12 changes: 6 additions & 6 deletions controllers/service_controller_test.go
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ import (
)

var (
testErrNotFound = fmt.Errorf("not found")
errNotFoundTest = fmt.Errorf("not found")
)

func TestService(t *testing.T) {
@@ -88,7 +88,7 @@ func TestService(t *testing.T) {
}, defaultWait, defaultTick)

_, err = getServiceInstanceFromObj(logger, serviceCopy)
assert.Equal(t, testErrNotFound, err, "Expect service to be deleted")
assert.Equal(t, errNotFoundTest, err, "Expect service to be deleted")
}
})
}
@@ -130,7 +130,7 @@ func TestService(t *testing.T) {
}, defaultWait, defaultTick)

_, err := getServiceInstanceFromObj(logger, serviceCopy)
assert.Equal(t, testErrNotFound, err)
assert.Equal(t, errNotFoundTest, err)
})

t.Run("should fail", func(t *testing.T) {
@@ -186,7 +186,7 @@ func getServiceInstanceFromObj(logt logr.Logger, service *ibmcloudv1.Service) (m
return instance, nil
}
}
return models.ServiceInstance{}, testErrNotFound
return models.ServiceInstance{}, errNotFoundTest
}

func TestServiceV1Alpha1Compat(t *testing.T) {
@@ -216,7 +216,7 @@ func TestServiceV1Alpha1Compat(t *testing.T) {
}, defaultWait, defaultTick)

_, err = getServiceInstanceFromObj(logger, serviceCopy)
assert.Equal(t, testErrNotFound, err, "Expect service to be deleted")
assert.Equal(t, errNotFoundTest, err, "Expect service to be deleted")
}

func TestServiceV1Beta1Compat(t *testing.T) {
@@ -246,7 +246,7 @@ func TestServiceV1Beta1Compat(t *testing.T) {
}, defaultWait, defaultTick)

_, err = getServiceInstanceFromObj(logger, serviceCopy)
assert.Equal(t, testErrNotFound, err, "Expect service to be deleted")
assert.Equal(t, errNotFoundTest, err, "Expect service to be deleted")
}

func TestServiceLoadServiceFailed(t *testing.T) {