Merged in feature/permit-integration-1 (pull request #172)

Permit integration - part 1

* WIP permit integration

* slim down build

* Merge branch 'main' of bitbucket.org:aarete/query-orchestration into feature/permit-integration-1

* omit swagger from auth

* clean build

* comment

* part 1 completed

this is the initial permitio parts and tests without integration. Also testing.md since we have a new test target `task test:permitio`

* feature flag for no jwt validation

* permit integration

* fix ci unit tests

* ci fix

* build fix

* fix home handler

* fix redirect

* test fix

* update docs for auth
This commit is contained in:
Jay Brown
2025-07-11 19:27:14 +00:00
parent 673ba503c8
commit 2ff6e05ffc
53 changed files with 2800 additions and 292 deletions
+11 -1
View File
@@ -33,7 +33,7 @@ vars:
TEST_PARALLEL:
sh: echo "2" # Minimal test parallelism
# yamllint disable-line rule:line-length
EXCLUDED_FILES: ".gen.go|internal/serviceconfig/observability/prometheus/generator/main.go|internal/cognitoauth/middleware.go|internal/cognitoauth/token.go|internal/cognitoauth/auth.go|internal/cognitoauth/handler.go|internal/cognitoauth/models.go|api/queryAPI/authHandlers.go|api/queryAPI/homehandler.go"
EXCLUDED_FILES: ".gen.go|internal/serviceconfig/observability/prometheus/generator/main.go|internal/cognitoauth/middleware.go|internal/cognitoauth/token.go|internal/cognitoauth/auth.go|internal/cognitoauth/handler.go|internal/cognitoauth/models.go|api/queryAPI/authHandlers.go|api/queryAPI/homehandler.go|api/queryAPI/controllers.go|api/queryAPI/test_helpers.go"
# yamllint disable-line rule:line-length
TESTS: "./internal/database/repository ./test ./test/queryAPI ./test/... ./internal/serviceconfig/queue ./internal/server/... ./..."
@@ -277,6 +277,16 @@ tasks:
- |
go test -parallel {{.TEST_PARALLEL}} -short \
{{.INTERNAL}} {{.API}} {{.CLI_ARGS}}
permitio:
desc: "Run Permit.io integration tests (requires local PDP)"
cmds:
- mkdir -p {{.OUT_DIR}}
- task: wait
- |
echo "Running Permit.io integration tests..."
echo "Note: Requires PERMIT_IO_API_KEY environment variable and local PDP running on port 7766"
go test -tags=permitio -parallel {{.TEST_PARALLEL}} -count=1 \
./internal/cognitoauth {{.CLI_ARGS}}
coverage:
internal: true
vars: