Skip to content

Commit 458615a

Browse files
author
Mateus Oliveira
authored
🌱 : fix: remove unnecessary make manifests and make generate in E2E scaffold code (#4471)
fix: remove unnecessary make manifest and make generate in E2E scaffold code Signed-off-by: Mateus Oliveira <[email protected]>
1 parent 250d677 commit 458615a

File tree

7 files changed

+14
-84
lines changed

7 files changed

+14
-84
lines changed

‎docs/book/src/cronjob-tutorial/testdata/project/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎docs/book/src/getting-started/testdata/project/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎docs/book/src/multiversion-tutorial/testdata/project/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎pkg/plugins/golang/v4/scaffolds/internal/templates/test/e2e/suite.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,9 @@ var _ = BeforeSuite(func() {
8888
By("Ensure that Prometheus is enabled")
8989
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
9090
91-
By("generating files")
92-
cmd := exec.Command("make", "generate")
93-
_, err := utils.Run(cmd)
94-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
95-
96-
By("generating manifests")
97-
cmd = exec.Command("make", "manifests")
98-
_, err = utils.Run(cmd)
99-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
100-
10191
By("building the manager(Operator) image")
102-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
103-
_, err = utils.Run(cmd)
92+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
93+
_, err := utils.Run(cmd)
10494
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
10595
10696
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎testdata/project-v4-multigroup/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎testdata/project-v4-with-plugins/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

‎testdata/project-v4/test/e2e/e2e_suite_test.go

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,9 @@ var _ = BeforeSuite(func() {
6060
By("Ensure that Prometheus is enabled")
6161
_ = utils.UncommentCode("config/default/kustomization.yaml", "#- ../prometheus", "#")
6262

63-
By("generating files")
64-
cmd := exec.Command("make", "generate")
65-
_, err := utils.Run(cmd)
66-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make generate")
67-
68-
By("generating manifests")
69-
cmd = exec.Command("make", "manifests")
70-
_, err = utils.Run(cmd)
71-
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to run make manifests")
72-
7363
By("building the manager(Operator) image")
74-
cmd = exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
75-
_, err = utils.Run(cmd)
64+
cmd := exec.Command("make", "docker-build", fmt.Sprintf("IMG=%s", projectImage))
65+
_, err := utils.Run(cmd)
7666
ExpectWithOffset(1, err).NotTo(HaveOccurred(), "Failed to build the manager(Operator) image")
7767

7868
// TODO(user): If you want to change the e2e test vendor from Kind, ensure the image is

0 commit comments

Comments
 (0)