Skip to content

Commit

Permalink
[tests] run in core-dev again
Browse files Browse the repository at this point in the history
  • Loading branch information
kylos101 authored and roboquat committed Jan 31, 2022
1 parent 50c2cf5 commit a82a23f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .werft/run-integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,23 @@ pod:
set -Eeuo pipefail
echo "[prep] receiving config..."
mkdir /root/.config
cp -R /config/gcloud /root/.config/gcloud
export GOOGLE_APPLICATION_CREDENTIALS=/config/gcloud/legacy_credentials/[email protected]/adc.json
export GOOGLE_APPLICATION_CREDENTIALS="/config/gcloud/legacy_credentials/[email protected]/adc.json"
echo "[prep] received config."
USERNAME="{{ .Annotations.username }}"
if [[ "$USERNAME" == "<no value>" ]]; then
USERNAME=""
fi
echo "[prep] using username: $USERNAME"
args=()
args+=( '-kubeconfig=/config/kubeconfig' )
args+=( "-namespace={{ .Annotations.namespace }}" )
[[ "$USERNAME" != "" ]] && args+=( "-username=$USERNAME" )
echo "[prep] args: ${args[@]}"
echo "[prep|DONE]"
/entrypoint.sh -kubeconfig=/config/kubeconfig -namespace={{ .Annotations.namespace }} -username=$USERNAME 2>&1 | ts "[int-tests] "
/entrypoint.sh "${args[@]}" 2>&1 | ts "[int-tests] "
RC=${PIPESTATUS[0]}
if [ $RC -eq 1 ]; then
Expand Down
4 changes: 2 additions & 2 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ There is a [werft job](../.werft/run-integration-tests.yaml) that runs the integ
Example command:
```
werft job run github -j .werft/run-integration-tests.yaml -a namespace=staging-gpl-2658-int-tests -a version=gpl-2658-int-tests.57 -f
werft run github -j .werft/run-integration-tests.yaml -a namespace=staging-gpl-2658-int-tests -a version=gpl-2658-int-tests.57 -f
```

### Manually
Expand All @@ -51,7 +51,7 @@ Best for when you want to validate an environment.
#### Go test

Best for when you're actively developing Gitpod.
Test will work if images that they use are already cached by gitpod instnance. If not, they might fail if it takes too long to pull an image.
Test will work if images that they use are already cached by Gitpod instance. If not, they might fail if it takes too long to pull an image.
There are 4 different types of tests:
1. Enterprise specific, that require valid license to be installed. Run those with `-enterprise=true`
2. Tests that require correct user (user should have github OAuth integration setup with gitpod). Run those with `-username=<gitpod_username>`. Make sure to load https://github.com/gitpod-io/gitpod-test-repo and https://github.com/gitpod-io/gitpod workspaces inside your gitpod that you are testing to preload those images onto your node. Wait for it to finish pulling those image, this will ensure that test will not fail due to timeout while waiting to pull an image for the first time.
Expand Down

0 comments on commit a82a23f

Please sign in to comment.