-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add gingko tooling * Add custom komega package * Add better context handling to custom komega * Add some test utilities * Add e2e test suite * Add basic e2e test for example shard * Replace deprecated golangcilint config
- Loading branch information
Showing
24 changed files
with
2,074 additions
and
37 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
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
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,20 @@ | ||
export_artifacts() { | ||
[ -n "${ARTIFACTS:-}" ] || return 0 | ||
|
||
mkdir -p "$ARTIFACTS" | ||
cluster_name=sharding | ||
echo "> Exporting logs of kind cluster '$cluster_name'" | ||
kind export logs "$ARTIFACTS" --name "$cluster_name" || true | ||
|
||
echo "> Exporting events of kind cluster '$cluster_name'" | ||
export_events | ||
} | ||
|
||
export_events() { | ||
local dir="$ARTIFACTS/events" | ||
mkdir -p "$dir" | ||
|
||
while IFS= read -r namespace; do | ||
kubectl -n "$namespace" get event --sort-by=lastTimestamp >"$dir/$namespace.log" 2>&1 || true | ||
done < <(kubectl get ns -oname | cut -d/ -f2) | ||
} |
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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
source "$(dirname "$0")/ci-common.sh" | ||
|
||
# test setup | ||
make kind-up | ||
export KUBECONFIG=$PWD/hack/kind_kubeconfig.yaml | ||
|
||
# export all container logs and events after test execution | ||
trap '{ | ||
export_artifacts | ||
make kind-down | ||
}' EXIT | ||
|
||
# deploy and test | ||
make up SKAFFOLD_TAIL=false | ||
make test-e2e GINKGO_FLAGS="--github-output" |
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
Oops, something went wrong.