@@ -6,14 +6,15 @@ import (
6
6
7
7
"github.com/stretchr/testify/require"
8
8
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
9
+ "k8s.io/apimachinery/pkg/util/rand"
9
10
10
11
operatorsv1alpha1 "github.com/operator-framework/operator-controller/api/v1alpha1"
11
12
)
12
13
13
14
func operator (spec operatorsv1alpha1.OperatorSpec ) * operatorsv1alpha1.Operator {
14
15
return & operatorsv1alpha1.Operator {
15
16
ObjectMeta : metav1.ObjectMeta {
16
- Name : "test-operator" ,
17
+ Name : "test-operator-" + rand . String ( 6 ) ,
17
18
},
18
19
Spec : spec ,
19
20
}
@@ -158,8 +159,6 @@ func TestOperatorValidSemver(t *testing.T) {
158
159
require .NotNil (t , cl )
159
160
err = cl .Create (ctx , op )
160
161
require .NoErrorf (t , err , "unexpected error for semver range '%q': %w" , validSemver , err )
161
- err = cl .Delete (ctx , op )
162
- require .NoErrorf (t , err , "unexpected error deleting valid semver '%q': %w" , validSemver , err )
163
162
}
164
163
}
165
164
@@ -209,7 +208,5 @@ func TestOperatorValidChannel(t *testing.T) {
209
208
require .NotNil (t , cl )
210
209
err = cl .Create (ctx , op )
211
210
require .NoErrorf (t , err , "unexpected error creating valid channel '%q': %w" , validChannel , err )
212
- err = cl .Delete (ctx , op )
213
- require .NoErrorf (t , err , "unexpected error deleting valid channel '%q': %w" , validChannel , err )
214
211
}
215
212
}
0 commit comments