Skip to content

Commit

Permalink
Better encapsulation for e2e test manifests (#1522)
Browse files Browse the repository at this point in the history
Summary:
Now that we've introduced `--kudo-image-pull-policy` init option, we can avoid the workaround of generating e2e KUDO manifests and make it part of the `kudo-e2e-test.yaml`

Signed-off-by: Aleksey Dukhovniy <alex.dukhovniy@googlemail.com>
  • Loading branch information
Aleksey Dukhovniy committed May 15, 2020
1 parent b10d869 commit fc59007
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 3 additions & 10 deletions hack/run-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,13 @@ set -o pipefail
set -o xtrace

INTEGRATION_OUTPUT_JUNIT=${INTEGRATION_OUTPUT_JUNIT:-false}
VERSION=${VERSION:-test}
KUDO_VERSION=${KUDO_VERSION:-test}

docker build . \
--build-arg ldflags_arg="" \
-t "kudobuilder/controller:$VERSION"
-t "kudobuilder/controller:$KUDO_VERSION"

# Generate the kudo.yaml that is used to install KUDO while running e2e-test
./bin/kubectl-kudo init --webhook InstanceValidation \
--unsafe-self-signed-webhook-ca --dry-run --output yaml \
--kudo-image kudobuilder/controller:$VERSION \
--kudo-image-pull-policy Never \
> test/manifests/kudo.yaml

sed "s/%version%/$VERSION/" kudo-e2e-test.yaml.tmpl > kudo-e2e-test.yaml
sed "s/%version%/$KUDO_VERSION/" kudo-e2e-test.yaml.tmpl > kudo-e2e-test.yaml

if [ "$INTEGRATION_OUTPUT_JUNIT" == true ]
then
Expand Down
2 changes: 2 additions & 0 deletions kudo-e2e-test.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ manifestDirs:
- ./test/manifests/
testDirs:
- ./test/e2e
commands:
- command: ./bin/kubectl-kudo init --webhook InstanceValidation --unsafe-self-signed-webhook-ca --kudo-image kudobuilder/controller:%version% --kudo-image-pull-policy Never
startKIND: true
kindContainers:
- kudobuilder/controller:%version%
Expand Down

0 comments on commit fc59007

Please sign in to comment.