Skip to content

Commit b36c673

Browse files
committed
ref(test): lint go code
1 parent c1a419c commit b36c673

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

pkg/gitreceive/k8s_util_test.go

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package gitreceive
22

33
import (
4-
// "reflect"
54
"fmt"
65
"strings"
76
"testing"
@@ -29,8 +28,8 @@ type slugBuildCase struct {
2928
name string
3029
namespace string
3130
env map[string]interface{}
32-
tarUrl string
33-
putUrl string
31+
tarURL string
32+
putURL string
3433
buildPack string
3534
}
3635

@@ -40,7 +39,7 @@ type dockerBuildCase struct {
4039
name string
4140
namespace string
4241
env map[string]interface{}
43-
tarUrl string
42+
tarURL string
4443
imgName string
4544
}
4645

@@ -64,7 +63,7 @@ func TestBuildPod(t *testing.T) {
6463
}
6564

6665
for _, build := range slugBuilds {
67-
pod = slugbuilderPod(build.debug, build.withAuth, build.name, build.namespace, build.env, build.tarUrl, build.putUrl, build.buildPack)
66+
pod = slugbuilderPod(build.debug, build.withAuth, build.name, build.namespace, build.env, build.tarURL, build.putURL, build.buildPack)
6867

6968
if pod.ObjectMeta.Name != build.name {
7069
t.Errorf("expected %v but returned %v ", build.name, pod.ObjectMeta.Name)
@@ -74,8 +73,8 @@ func TestBuildPod(t *testing.T) {
7473
t.Errorf("expected %v but returned %v ", build.namespace, pod.ObjectMeta.Namespace)
7574
}
7675

77-
checkForEnv(t, pod, "TAR_URL", build.tarUrl)
78-
checkForEnv(t, pod, "put_url", build.putUrl)
76+
checkForEnv(t, pod, "TAR_URL", build.tarURL)
77+
checkForEnv(t, pod, "put_url", build.putURL)
7978

8079
if build.buildPack != "" {
8180
checkForEnv(t, pod, "BUILDPACK_URL", build.buildPack)
@@ -94,7 +93,7 @@ func TestBuildPod(t *testing.T) {
9493
}
9594

9695
for _, build := range dockerBuilds {
97-
pod = dockerBuilderPod(build.debug, build.withAuth, build.name, build.namespace, build.env, build.tarUrl, build.imgName)
96+
pod = dockerBuilderPod(build.debug, build.withAuth, build.name, build.namespace, build.env, build.tarURL, build.imgName)
9897

9998
if pod.ObjectMeta.Name != build.name {
10099
t.Errorf("expected %v but returned %v ", build.name, pod.ObjectMeta.Name)
@@ -103,7 +102,7 @@ func TestBuildPod(t *testing.T) {
103102
t.Errorf("expected %v but returned %v ", build.namespace, pod.ObjectMeta.Namespace)
104103
}
105104
if !build.withAuth {
106-
checkForEnv(t, pod, "TAR_URL", build.tarUrl)
105+
checkForEnv(t, pod, "TAR_URL", build.tarURL)
107106
checkForEnv(t, pod, "IMG_NAME", build.imgName)
108107
}
109108
}

0 commit comments

Comments
 (0)