-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor e2e tests to have fewer dependencies
- Loading branch information
Showing
9 changed files
with
76 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,10 @@ endif | |
|
||
all: manager | ||
|
||
# Run tests | ||
test: generate fmt vet manifests | ||
go test ./... -coverprofile cover.out | ||
|
||
.PHONY: test | ||
test: manifests generate fmt ginkgo | ||
ginkgo -vv -r --cover --keep-going --junit-report junit-report.xml -- --trace --db-trace | ||
|
||
# Build manager binary | ||
manager: generate fmt vet | ||
|
@@ -201,6 +202,11 @@ else | |
UPX=$(shell which upx) | ||
endif | ||
|
||
|
||
.PHONY: ginkgo | ||
ginkgo: | ||
go install github.com/onsi/ginkgo/v2/ginkgo | ||
|
||
.bin/controller-gen: .bin | ||
GOBIN=$(PWD)/.bin go install sigs.k8s.io/controller-tools/cmd/[email protected] | ||
CONTROLLER_GEN=$(GOBIN)/controller-gen | ||
|
@@ -227,25 +233,10 @@ endif | |
curl -sSLo .bin/karina https://github.com/flanksource/karina/releases/download/v0.50.0/karina_$(OS)-$(ARCH) && \ | ||
chmod +x .bin/karina | ||
|
||
.PHONY: telepresence | ||
telepresence: | ||
ifeq (, $(shell which telepresence)) | ||
ifeq ($(OS), darwin) | ||
brew install --cask macfuse | ||
brew install datawire/blackbird/telepresence-legacy | ||
else | ||
sudo apt-get install -y conntrack | ||
wget https://s3.amazonaws.com/datawire-static-files/telepresence/telepresence-0.109.tar.gz | ||
tar xzf telepresence-0.109.tar.gz | ||
sudo mv telepresence-0.109/bin/telepresence /usr/local/bin/ | ||
sudo mv telepresence-0.109/libexec/sshuttle-telepresence /usr/local/bin/ | ||
endif | ||
endif | ||
|
||
.bin: | ||
mkdir -p .bin | ||
|
||
bin: .bin .bin/wait4x .bin/karina .bin/go-junit-report telepresence | ||
bin: .bin .bin/wait4x .bin/karina | ||
|
||
# Generate all the resources and formats your code, i.e: CRDs, controller-gen, static | ||
.PHONY: resources | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flanksource/canary-checker-full |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: canaries.flanksource.com/v1 | ||
kind: Canary | ||
metadata: | ||
name: kube-system-checks | ||
spec: | ||
interval: 30 | ||
kubernetes: | ||
- namespace: kube-system | ||
name: kube-system | ||
kind: Pod | ||
# ready: true | ||
# resource: | ||
# labelSelector: k8s-app=kube-dns | ||
namespaceSelector: | ||
name: default | ||
display: | ||
expr: | | ||
dyn(results). | ||
map(i, i.Object). | ||
filter(i, !k8s.isHealthy(i)). | ||
map(i, "%s/%s -> %s".format([i.metadata.namespace, i.metadata.name, k8s.getHealth(i).message])).join('\n') | ||
test: | ||
expr: dyn(results).all(x, k8s.isHealthy(x)) |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flanksource/canary-checker-full |
This file contains 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