Skip to content

Commit ac77a43

Browse files
committed
add test-short
1 parent ce41f97 commit ac77a43

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,7 @@ fmt:
1919
go fmt ./...
2020

2121
test:
22-
KUBEBUILDER_ASSETS=$$(setup-envtest use -p path) go test ./...
22+
KUBEBUILDER_ASSETS=$$(setup-envtest use -p path) go test ./...
23+
24+
test-short:
25+
go test -short ./...

internal/controller/controller_integration_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ func setup(t *testing.T, onlyNamespace string, excludeNamespaces string) (*kuber
111111
if err != nil {
112112
t.Fatalf("failed to create controller: %v", err)
113113
}
114-
mockDeploymentrecord := &mockRecordPoster{}
115-
ctrl.apiClient = mockDeploymentrecord
114+
mockDeploymentRecordPoster := &mockRecordPoster{}
115+
ctrl.apiClient = mockDeploymentRecordPoster
116116

117117
go func() {
118118
_ = ctrl.Run(ctx, 1)
@@ -121,7 +121,7 @@ func setup(t *testing.T, onlyNamespace string, excludeNamespaces string) (*kuber
121121
t.Fatal("timed out waiting for informer cache to sync")
122122
}
123123

124-
return clientset, mockDeploymentrecord
124+
return clientset, mockDeploymentRecordPoster
125125
}
126126

127127
func makeDeployment(t *testing.T, clientset *kubernetes.Clientset, owners []metav1.OwnerReference, namespace, name string) *appsv1.Deployment {
@@ -284,7 +284,7 @@ func deletePod(t *testing.T, clientset *kubernetes.Clientset, namespace, name st
284284
}
285285
}
286286

287-
func TestControllerIntegration_KubernetesDeployment(t *testing.T) {
287+
func TestControllerIntegration_KubernetesDeploymentLifecycle(t *testing.T) {
288288
if testing.Short() {
289289
t.Skip("skipping integration test in short mode")
290290
}

0 commit comments

Comments
 (0)