Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary make command to install tools in e2e tests #72

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions test/e2e/e2e_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,21 +64,9 @@ func TestMain(m *testing.M) {

// prepare the resources
func(ctx context.Context, cfg *envconf.Config) (context.Context, error) {
log.Println("Installing bin tools...")
cmd := exec.Command("make", "kustomize")
if _, err := test_utils.Run(cmd); err != nil {
log.Printf("Failed to install kustomize binary: %s", err)
return ctx, err
}
cmd = exec.Command("make", "controller-gen")
if _, err := test_utils.Run(cmd); err != nil {
log.Printf("Failed to install controller-gen binary: %s", err)
return ctx, err
}

// gen manifest files
log.Println("Generate manifests...")
cmd = exec.Command("make", "manifests")
cmd := exec.Command("make", "manifests")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that even `make manifests" isn't needed. Feel free to raise a new PR to remove & test it. thx

install: manifests kustomize ## Install CRDs into the K8s cluster specified in ~/.kube/config.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. manifests is a prereq from test-e2e. So, we could also call docker-build by setting it as a prereq for test-e2e. I'll open a pull request with this change, too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nevermind. It is a pre-requisite for install, as you mentioned. It doesn't make sense to have it as prereq for test-e2e, because if the tests are run with go test, it won't have the manifests. It makes more sense to remove it from test-e2e.

if _, err := test_utils.Run(cmd); err != nil {
log.Printf("Failed to generate manifests: %s", err)
return ctx, err
Expand Down