@@ -8,15 +8,15 @@ import (
8
8
"testing"
9
9
"time"
10
10
11
- "github.com/nais/azureator/api/v1alpha1 "
11
+ "github.com/nais/azureator/api/v1 "
12
12
azureFixtures "github.com/nais/azureator/pkg/fixtures/azure"
13
13
"github.com/nais/azureator/pkg/fixtures/k8s"
14
14
"github.com/nais/azureator/pkg/resourcecreator"
15
15
"github.com/nais/azureator/pkg/util/test"
16
16
"github.com/stretchr/testify/assert"
17
17
corev1 "k8s.io/api/core/v1"
18
18
"k8s.io/apimachinery/pkg/api/errors"
19
- v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
19
+ metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
20
20
"k8s.io/apimachinery/pkg/runtime"
21
21
"k8s.io/client-go/kubernetes/scheme"
22
22
ctrl "sigs.k8s.io/controller-runtime"
@@ -145,8 +145,8 @@ func TestReconciler_DeleteAzureAdApplication(t *testing.T) {
145
145
}
146
146
147
147
// asserts that the application exists in the cluster and is valid
148
- func assertApplicationExists (t * testing.T , testName string , name string ) * v1alpha1 .AzureAdApplication {
149
- instance := & v1alpha1 .AzureAdApplication {}
148
+ func assertApplicationExists (t * testing.T , testName string , name string ) * v1 .AzureAdApplication {
149
+ instance := & v1 .AzureAdApplication {}
150
150
key := client.ObjectKey {
151
151
Name : name ,
152
152
Namespace : namespace ,
@@ -187,7 +187,7 @@ func assertApplicationExists(t *testing.T, testName string, name string) *v1alph
187
187
return instance
188
188
}
189
189
190
- func assertSecretExists (t * testing.T , name string , instance * v1alpha1 .AzureAdApplication ) {
190
+ func assertSecretExists (t * testing.T , name string , instance * v1 .AzureAdApplication ) {
191
191
t .Run (fmt .Sprintf ("Secret '%s'" , name ), func (t * testing.T ) {
192
192
key := client.ObjectKey {
193
193
Namespace : namespace ,
@@ -222,8 +222,8 @@ func resourceDoesNotExist(key client.ObjectKey, instance runtime.Object) func()
222
222
}
223
223
}
224
224
225
- func containsOwnerRef (refs []v1 .OwnerReference , owner v1alpha1 .AzureAdApplication ) bool {
226
- expected := v1 .OwnerReference {
225
+ func containsOwnerRef (refs []metav1 .OwnerReference , owner v1 .AzureAdApplication ) bool {
226
+ expected := metav1 .OwnerReference {
227
227
APIVersion : owner .APIVersion ,
228
228
Kind : owner .Kind ,
229
229
Name : owner .Name ,
@@ -254,7 +254,7 @@ func setup() (*envtest.Environment, error) {
254
254
return nil , err
255
255
}
256
256
257
- err = v1alpha1 .AddToScheme (scheme .Scheme )
257
+ err = v1 .AddToScheme (scheme .Scheme )
258
258
if err != nil {
259
259
return nil , err
260
260
}
0 commit comments