Skip to content

Commit e56cedf

Browse files
committed
Refactor testUtils variable name
Signed-off-by: ArkaSaha30 <[email protected]>
1 parent c4d7a62 commit e56cedf

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/e2e/e2e_suite_test.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"sigs.k8s.io/e2e-framework/support/kind"
3737

3838
ecv1alpha1 "go.etcd.io/etcd-operator/api/v1alpha1"
39-
test_utils "go.etcd.io/etcd-operator/test/utils"
39+
testUtils "go.etcd.io/etcd-operator/test/utils"
4040
)
4141

4242
var (
@@ -72,12 +72,12 @@ func TestMain(m *testing.M) {
7272
// Build docker image
7373
log.Println("Building docker image...")
7474
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", imageName))
75-
if _, err := test_utils.Run(cmd); err != nil {
75+
if _, err := testUtils.Run(cmd); err != nil {
7676
log.Printf("Failed to build docker image: %s", err)
7777
return ctx, err
7878
}
7979

80-
if err := test_utils.LoadContainerImageToKindCluster(ctx,
80+
if err := testUtils.LoadContainerImageToKindCluster(ctx,
8181
kindCluster,
8282
imageName, containerTool); err != nil {
8383
log.Println(err)
@@ -90,12 +90,12 @@ func TestMain(m *testing.M) {
9090
// install prometheus and cert-manager
9191
func(ctx context.Context, cfg *envconf.Config) (context.Context, error) {
9292
log.Println("Installing prometheus operator...")
93-
if err := test_utils.InstallPrometheusOperator(); err != nil {
93+
if err := testUtils.InstallPrometheusOperator(); err != nil {
9494
log.Printf("Unable to install Prometheus operator: %s", err)
9595
}
9696

9797
log.Println("Installing cert-manager...")
98-
if err := test_utils.InstallCertManager(); err != nil {
98+
if err := testUtils.InstallCertManager(); err != nil {
9999
log.Printf("Unable to install Cert Manager: %s", err)
100100
}
101101

@@ -115,7 +115,7 @@ func TestMain(m *testing.M) {
115115
// install crd
116116
log.Println("Install crd...")
117117
cmd := exec.Command("make", "install")
118-
if _, err := test_utils.Run(cmd); err != nil {
118+
if _, err := testUtils.Run(cmd); err != nil {
119119
log.Printf("Failed to install crd: %s", err)
120120
return ctx, err
121121
}
@@ -125,7 +125,7 @@ func TestMain(m *testing.M) {
125125

126126
log.Println("Deploying controller-manager resources...")
127127
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", imageName))
128-
if _, err := test_utils.Run(cmd); err != nil {
128+
if _, err := testUtils.Run(cmd); err != nil {
129129
log.Printf("Failed to deploy resource configurations: %s", err)
130130
return ctx, err
131131
}
@@ -162,14 +162,14 @@ func TestMain(m *testing.M) {
162162
// undeploy etcd operator
163163
log.Println("Undeploy etcd controller...")
164164
cmd := exec.Command("make", "undeploy", "ignore-not-found=true")
165-
if _, err := test_utils.Run(cmd); err != nil {
165+
if _, err := testUtils.Run(cmd); err != nil {
166166
log.Printf("Warning: Failed to undeploy controller: %s", err)
167167
}
168168

169169
// uninstall crd
170170
log.Println("Uninstalling crd...")
171171
cmd = exec.Command("make", "uninstall", "ignore-not-found=true")
172-
if _, err := test_utils.Run(cmd); err != nil {
172+
if _, err := testUtils.Run(cmd); err != nil {
173173
log.Printf("Warning: Failed to install crd: %s", err)
174174
}
175175

@@ -189,10 +189,10 @@ func TestMain(m *testing.M) {
189189
log.Println("Removing dependencies...")
190190

191191
// remove prometheus
192-
test_utils.UninstallPrometheusOperator()
192+
testUtils.UninstallPrometheusOperator()
193193

194194
// remove cert-manager
195-
test_utils.UninstallCertManager()
195+
testUtils.UninstallCertManager()
196196

197197
return ctx, nil
198198
},

0 commit comments

Comments
 (0)