Skip to content

Commit 8e5c792

Browse files
committed
Fix: incorporate test coverage report
* update Makefile for clean and test targets * Fix product_info job which was timing out due to absence of nginx-ingress container
1 parent 625c0be commit 8e5c792

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Makefile

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,12 @@ nginx-utils:
66
docker buildx build --build-context project=nginx-utils --platform linux/amd64 -t nginx-utils -f nginx-utils/Dockerfile .
77

88
install: build
9-
sudo cp cmd/kubectl-nginx_supportpkg /usr/local/bin
9+
sudo cp cmd/kubectl-nginx_supportpkg /usr/local/bin
10+
11+
clean:
12+
rm -f cmd/kubectl-nginx_supportpkg
13+
14+
test:
15+
go clean -testcache && go test -v ./... -coverprofile=coverage.out
16+
go tool cover -func=coverage.out
17+
go tool cover -html=coverage.out -o coverage.html

pkg/jobs/nic_job_list_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func TestNICJobList_ExecJobs(t *testing.T) {
3838
ObjectMeta: metav1.ObjectMeta{Name: "ingress-pod", Namespace: "test-ns"},
3939
Spec: corev1.PodSpec{
4040
Containers: []corev1.Container{
41-
{Name: "container1"},
41+
{Name: "nginx-ingress", Image: "nginx-ingress:latest"},
4242
},
4343
},
4444
})

0 commit comments

Comments
 (0)