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

🌱 Remove ginkgo from internal/controller unit tests #541

Merged
merged 6 commits into from
Nov 17, 2023
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
Next Next commit
Use random name for operators
Signed-off-by: Todd Short <[email protected]>
  • Loading branch information
tmshort committed Nov 16, 2023
commit af6d30bfcd8dfc8797404897874491c848ce76e0
6 changes: 1 addition & 5 deletions internal/controllers/admission_test.go
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import (
func operator(spec operatorsv1alpha1.OperatorSpec) *operatorsv1alpha1.Operator {
return &operatorsv1alpha1.Operator{
ObjectMeta: metav1.ObjectMeta{
Name: "test-operator",
tmshort marked this conversation as resolved.
Show resolved Hide resolved
GenerateName: "test-operator",
},
Spec: spec,
}
@@ -158,8 +158,6 @@ func TestOperatorValidSemver(t *testing.T) {
require.NotNil(t, cl)
err = cl.Create(ctx, op)
require.NoErrorf(t, err, "unexpected error for semver range '%q': %w", validSemver, err)
err = cl.Delete(ctx, op)
require.NoErrorf(t, err, "unexpected error deleting valid semver '%q': %w", validSemver, err)
}
}

@@ -209,7 +207,5 @@ func TestOperatorValidChannel(t *testing.T) {
require.NotNil(t, cl)
err = cl.Create(ctx, op)
require.NoErrorf(t, err, "unexpected error creating valid channel '%q': %w", validChannel, err)
err = cl.Delete(ctx, op)
require.NoErrorf(t, err, "unexpected error deleting valid channel '%q': %w", validChannel, err)
}
}