Repository navigation
Nerf unit tests and fix build directive - #4
Merged
Merged
Conversation
Add necessary go flags to the `make build` directive.
`rm controllers/suite_test.go` The suite_test.go unit test file creates a mock cluster using etcd, among other binaries. This does not intermix well with our CI environment. This commit removes this file. We will add unit tests in the near future.
Miciah
reviewed
Jun 22, 2021
|
|
||
| ##@ Build | ||
|
|
||
| GO=GO111MODULE=on GOFLAGS=-mod=vendor CGO_ENABLED=0 go |
Contributor
There was a problem hiding this comment.
Presumably CGO_ENABLED=0 is key because the other variables are on by default with the version of Go we currently use, right?
Contributor
There was a problem hiding this comment.
According to https://golang.org/ref/mod#vendoring, "If the vendor directory is present in the main module's root directory, it will be used automatically if the go version in the main module's go.mod file is 1.14 or higher." So it seems like specifying GOFLAGS=-mod=vendor is redundant—but it doesn't hurt anything.
Author
There was a problem hiding this comment.
Huh, TIL. Still, can't hurt to be explicit.
sgreene570
added a commit
to sgreene570/external-dns-operator
that referenced
this pull request
Jun 28, 2021
Run `go mod tidy` and `go mod vendor` and commit the output. This repo does not have a `verify` job to ensure that `vendor/` is in sync, and openshift#4 knocked `go.mod` out of sync by removing the need for the gomega and ginkgo dependency (without also removing the dependency requirement).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Makefile: Force builds to use vendor/
Add necessary go flags to the
make builddirective.Remove mock-cluster unit test
rm controllers/suite_test.goThe suite_test.go unit test file creates a mock cluster using etcd,
among other binaries. This does not intermix well with our CI
environment.
This commit removes this file. We will add unit tests in the near
future.