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
+10 -5
View File
@@ -44,9 +44,10 @@ func TestCreateQuery(t *testing.T) {
t.Parallel()
cfg := &ControllerConfig{}
test.CreateDB(t, cfg)
initializeTestConfig(t, cfg)
svc := createControllerServices(cfg)
cons := queryapi.NewControllers(svc)
cons := queryapi.NewControllers(svc, cfg)
body := queryapi.QueryCreate{
Type: queryapi.CONTEXTFULL,
@@ -64,9 +65,10 @@ func TestListQueries(t *testing.T) {
t.Parallel()
cfg := &ControllerConfig{}
test.CreateDB(t, cfg)
initializeTestConfig(t, cfg)
svc := createControllerServices(cfg)
cons := queryapi.NewControllers(svc)
cons := queryapi.NewControllers(svc, cfg)
ctx, rec := createContext(t)
@@ -92,9 +94,10 @@ func TestGetQuery(t *testing.T) {
t.Parallel()
cfg := &ControllerConfig{}
test.CreateDB(t, cfg)
initializeTestConfig(t, cfg)
svc := createControllerServices(cfg)
cons := queryapi.NewControllers(svc)
cons := queryapi.NewControllers(svc, cfg)
ctx, rec := createContext(t)
@@ -116,13 +119,14 @@ func TestUpdateQuery(t *testing.T) {
t.Parallel()
cfg := &ControllerConfig{}
test.CreateDB(t, cfg)
initializeTestConfig(t, cfg)
acfg := test.CreateAWSContainer(t, cfg)
test.SetQueueClient(t, t.Context(), cfg, acfg.ExternalEndpoint)
cfg.QueryVersionSyncURL = test.CreateQueue(t, cfg, test.QueryVersionSyncRunnerName)
svc := createControllerServices(cfg)
cons := queryapi.NewControllers(svc)
cons := queryapi.NewControllers(svc, cfg)
id, err := cfg.GetDBQueries().CreateQuery(t.Context(), repository.QuerytypeJsonExtractor)
require.NoError(t, err)
@@ -229,9 +233,10 @@ func TestTestQuery(t *testing.T) {
t.Parallel()
cfg := &ControllerConfig{}
test.CreateDB(t, cfg)
initializeTestConfig(t, cfg)
svc := createControllerServices(cfg)
cons := queryapi.NewControllers(svc)
cons := queryapi.NewControllers(svc, cfg)
contextQueryId, err := svc.Query.Create(t.Context(), &resultprocessor.Create{
Type: resultprocessor.TypeContextFull,