Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
flux2
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
fluxcd
flux2
Commits
66780bbf
Unverified
Commit
66780bbf
authored
3 years ago
by
Stefan Prodan
Browse files
Options
Downloads
Patches
Plain Diff
Install envtest before running the unit tests
Signed-off-by:
Stefan Prodan
<
stefan.prodan@gmail.com
>
parent
a8932e67
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+7
-3
7 additions, 3 deletions
Makefile
with
7 additions
and
3 deletions
Makefile
+
7
−
3
View file @
66780bbf
...
...
@@ -2,7 +2,7 @@ VERSION?=$(shell grep 'VERSION' cmd/flux/main.go | awk '{ print $$4 }' | head -n
EMBEDDED_MANIFESTS_TARGET
=
cmd/flux/.manifests.done
TEST_KUBECONFIG
?=
/tmp/flux-e2e-test-kubeconfig
ENVTEST_BIN_VERSION
?=
latest
KUBEBUILDER_ASSETS
?=
"
$(
shell
$(
SETUP_ENVTEST
)
use -i
$(
ENVTEST_BIN_VERSION
)
-p path
)
"
KUBEBUILDER_ASSETS
?=
$(
shell
$(
SETUP_ENVTEST
)
use
-i
$(
ENVTEST_BIN_VERSION
)
-p
path
)
# Get the currently used golang install path (in GOPATH/bin, unless GOBIN is set)
ifeq
(,$(shell go env GOBIN))
...
...
@@ -33,13 +33,13 @@ cleanup-kind:
kind delete cluster
--name
=
flux-e2e-test
rm
$(
TEST_KUBECONFIG
)
test
:
$(EMBEDDED_MANIFESTS_TARGET) tidy fmt vet
setup
-envtest
test
:
$(EMBEDDED_MANIFESTS_TARGET) tidy fmt vet
install
-envtest
KUBEBUILDER_ASSETS
=
"
$(
KUBEBUILDER_ASSETS
)
"
go
test
./...
-coverprofile
cover.out
--tags
=
unit
e2e
:
$(EMBEDDED_MANIFESTS_TARGET) tidy fmt vet
TEST_KUBECONFIG
=
$(
TEST_KUBECONFIG
)
go
test
./cmd/flux/...
-coverprofile
e2e.cover.out
--tags
=
e2e
-v
-failfast
test-with-kind
:
setup
-envtest
test-with-kind
:
install
-envtest
make setup-kind
make e2e
make cleanup-kind
...
...
@@ -58,6 +58,10 @@ install:
install-dev
:
CGO_ENABLED
=
0 go build
-o
/usr/local/bin ./cmd/flux
install-envtest
:
setup-envtest
$(
SETUP_ENVTEST
)
use
$(
ENVTEST_BIN_VERSION
)
# Find or download setup-envtest
setup-envtest
:
ifeq
(, $(shell which setup-envtest))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment