-
Notifications
You must be signed in to change notification settings - Fork 104
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
Separate E2E and operator tests #1540
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
set -o xtrace | ||
|
||
INTEGRATION_OUTPUT_JUNIT=${INTEGRATION_OUTPUT_JUNIT:-false} | ||
KUDO_VERSION=${KUDO_VERSION:-test} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need documentation in these scripts that there are preconditions / expectations.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is to allow users to override |
||
|
||
docker build . \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is there a docker build in this script? shouldn't this be part of the precondition of this script? don't we already have a build for docker in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. perhaps this docker build is slightly different... where it includes run-test-* scripts. making a need for a different build. The line I don't see any reason to change the file name to match "operator" tests vs e2e. "operator" tests is another grouping of e2e tests with a different purpose is what I imagine without more clarification. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has to do with the test setup that is working around limitations in CircleCI. |
||
--build-arg ldflags_arg="" \ | ||
-t "kudobuilder/controller:$KUDO_VERSION" | ||
|
||
if [ "$INTEGRATION_OUTPUT_JUNIT" == true ] | ||
then | ||
echo "Running operator tests with junit output" | ||
mkdir -p reports/ | ||
go get github.com/jstemmer/go-junit-report | ||
|
||
rm -rf operators | ||
git clone https://github.com/kudobuilder/operators | ||
mkdir operators/bin/ | ||
cp ./bin/kubectl-kudo operators/bin/ | ||
sed "s/%version%/$KUDO_VERSION/" operators/kudo-test.yaml.tmpl > operators/kudo-test.yaml | ||
cd operators && ./bin/kubectl-kudo test --artifacts-dir /tmp/kudo-e2e-test 2>&1 \ | ||
| tee /dev/fd/2 \ | ||
| go-junit-report -set-exit-code \ | ||
> ../reports/kudo_operators_test_report.xml | ||
else | ||
echo "Running operator tests without junit output" | ||
|
||
rm -rf operators | ||
git clone https://github.com/kudobuilder/operators | ||
mkdir operators/bin/ | ||
cp ./bin/kubectl-kudo operators/bin/ | ||
sed "s/%version%/$KUDO_VERSION/" operators/kudo-test.yaml.tmpl > operators/kudo-test.yaml | ||
nfnt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
cd operators && ./bin/kubectl-kudo test --artifacts-dir /tmp/kudo-e2e-test | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: