diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7ee38c1561..cee35c656c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -71,13 +71,7 @@ jobs: - uses: actions/setup-go@v2 with: go-version: "1.20" - - uses: actions/cache@v2 - with: - path: ~/go/bin/oathkeeper - key: oathkeeper-${{ hashFiles('~/go/bin/oathkeeper') }} - run: | - make install - go version -m $(which oathkeeper) | grep "\w*build" ./test/${{ matrix.name }}/run.sh docs-cli: diff --git a/test/e2e/run.sh b/test/e2e/run.sh index dcdda7727e..9b81927e34 100755 --- a/test/e2e/run.sh +++ b/test/e2e/run.sh @@ -22,32 +22,29 @@ killall oathkeeper || true killall okapi || true killall okclient || true -OATHKEEPER="go run ../.." -OKAPI="go run ./okapi" -OKCLIENT="go run ./okclient" - export OATHKEEPER_PROXY=http://127.0.0.1:6660 export OATHKEEPER_API=http://127.0.0.1:6661 export GO111MODULE=on -[[ "$(command -v oathkeeper)" == "" ]] && - (cd ../../; make install) - -$OATHKEEPER --config ./config.yml serve > ./oathkeeper.e2e.log 2>&1 & -PORT=6662 $OKAPI > ./api.e2e.log 2>&1 & +go build -o . ../.. +./oathkeeper --config ./config.yml serve > ./oathkeeper.e2e.log 2>&1 & +PORT=6662 go run ./okapi > ./api.e2e.log 2>&1 & waitport 6660 waitport 6661 waitport 6662 function finish { + echo ::group::Oathkeeper Log cat ./oathkeeper.e2e.log - echo "-----" + echo ::endgroup:: + echo ::group::OK API Log cat ./api.e2e.log + echo ::endgroup:: } trap finish EXIT -$OKCLIENT +go run ./okclient kill %1 || true kill %2 || true diff --git a/test/forwarded-header/run.sh b/test/forwarded-header/run.sh index 6b206f5572..7d674933f4 100755 --- a/test/forwarded-header/run.sh +++ b/test/forwarded-header/run.sh @@ -24,7 +24,8 @@ run_oathkekeper() { export OATHKEEPER_PROXY=http://127.0.0.1:6060 export OATHKEEPER_API=http://127.0.0.1:6061 - LOG_LEVEL=debug go run ../.. --config ./config.yaml serve > ./oathkeeper.log 2>&1 & + go build -o . ../.. + LOG_LEVEL=debug ./oathkeeper --config ./config.yaml serve > ./oathkeeper.log 2>&1 & waitport 6060 waitport 6061 diff --git a/test/reload/rules.1.json b/test/reload/rules.1.json index 3d6532e210..36f216e53e 100644 --- a/test/reload/rules.1.json +++ b/test/reload/rules.1.json @@ -2,7 +2,8 @@ { "id": "test-rule-1", "upstream": { - "url": "https://httpbin.org/anything/" + "url": "https://example.com/", + "strip_path": "/rules" }, "match": { "url": "http://127.0.0.1:6060/rules", diff --git a/test/reload/rules.2.json b/test/reload/rules.2.json index 8bd68d76de..5f76bfbaa1 100644 --- a/test/reload/rules.2.json +++ b/test/reload/rules.2.json @@ -2,7 +2,8 @@ { "id": "test-rule-1", "upstream": { - "url": "https://httpbin.org/anything/" + "url": "https://example.com/", + "strip_path": "/rules" }, "match": { "url": "http://127.0.0.1:6060/rules", diff --git a/test/reload/rules.3.1.json b/test/reload/rules.3.1.json index 9610a468e5..21bda0fa64 100644 --- a/test/reload/rules.3.1.json +++ b/test/reload/rules.3.1.json @@ -2,7 +2,8 @@ { "id": "test-rule-2", "upstream": { - "url": "https://httpbin.org/anything/" + "url": "https://example.com/", + "strip_path": "/other-rules" }, "match": { "url": "http://127.0.0.1:6060/other-rules", diff --git a/test/reload/rules.3.2.json b/test/reload/rules.3.2.json index 842cdc0bf1..b2820f02b6 100644 --- a/test/reload/rules.3.2.json +++ b/test/reload/rules.3.2.json @@ -2,7 +2,8 @@ { "id": "test-rule-2", "upstream": { - "url": "https://httpbin.org/anything/" + "url": "https://example.com/", + "strip_path": "/other-rules" }, "match": { "url": "http://127.0.0.1:6060/other-rules", diff --git a/test/reload/run.sh b/test/reload/run.sh index c5427468da..547da42a93 100755 --- a/test/reload/run.sh +++ b/test/reload/run.sh @@ -23,21 +23,23 @@ export OATHKEEPER_PROXY=http://127.0.0.1:6060 export OATHKEEPER_API=http://127.0.0.1:6061 export GO111MODULE=on -[[ "$(command -v oathkeeper)" == "" ]] && - (cd ../../; make install) - cp config.1.yaml config.yaml -LOG_LEVEL=debug oathkeeper --config ./config.yaml serve >> ./oathkeeper.log 2>&1 & +go build -o . ../.. +LOG_LEVEL=debug ./oathkeeper --config ./config.yaml serve > ./oathkeeper.log 2>&1 & waitport 6060 waitport 6061 function finish { killall oathkeeper || true + echo ::group::Config cat ./config.yaml cat ./rules.3.json || true + echo ::endgroup:: + echo ::group::Log cat ./oathkeeper.log + echo ::endgroup:: } trap finish EXIT