Skip to content
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

debugging #722

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Tests

on:
push:
branches: [ master ]
branches: [ failing-app-test0 ]
pull_request:
branches: [ master ]
branches: [ failing-app-test0 ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down Expand Up @@ -125,4 +125,4 @@ jobs:
git config --global user.name "$GITHUB_ACTOR"
git config --global user.email "<>"

./run.sh
./run.sh
10 changes: 8 additions & 2 deletions app-tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,18 @@ function generate_opal_keys {
rm opal_crypto_key.pub opal_crypto_key

OPAL_AUTH_MASTER_TOKEN="$(openssl rand -hex 16)"
# debug
echo "Master token: $OPAL_AUTH_MASTER_TOKEN"

OPAL_AUTH_JWT_AUDIENCE=https://api.opal.ac/v1/ OPAL_AUTH_JWT_ISSUER=https://opal.ac/ OPAL_REPO_WATCHER_ENABLED=0 \
opal-server run &
sleep 2;

OPAL_CLIENT_TOKEN="$(opal-client obtain-token "$OPAL_AUTH_MASTER_TOKEN" --type client)"
OPAL_DATA_SOURCE_TOKEN="$(opal-client obtain-token "$OPAL_AUTH_MASTER_TOKEN" --type datasource)"
# debug
echo "Data source token: $OPAL_DATA_SOURCE_TOKEN"

# shellcheck disable=SC2009
ps -ef | grep opal-server | grep -v grep | awk '{print $2}' | xargs kill
sleep 5;
Expand All @@ -41,7 +47,7 @@ function prepare_policy_repo {
echo "- Clone tests policy repo to create test's branch"
export OPAL_POLICY_REPO_URL
export POLICY_REPO_BRANCH
OPAL_POLICY_REPO_URL=${OPAL_POLICY_REPO_URL:-git@github.com:permitio/opal-tests-policy-repo.git}
OPAL_POLICY_REPO_URL=${OPAL_POLICY_REPO_URL:-git@github.com:daveads/opal-example-policy-repo.git}
POLICY_REPO_BRANCH=test-$RANDOM$RANDOM
rm -rf ./opal-tests-policy-repo
git clone "$OPAL_POLICY_REPO_URL"
Expand Down Expand Up @@ -174,4 +180,4 @@ if [ $RETRY_COUNT -eq $MAX_RETRIES ]; then
exit 1
fi

echo "Tests passed successfully."
echo "Tests passed successfully."
Loading