diff --git a/compose.yml b/compose.yml index bc2ddcc..4525f8f 100644 --- a/compose.yml +++ b/compose.yml @@ -87,6 +87,7 @@ services: - ./docker/config/cdp-portal-frontend.env environment: - PORT=3000 + - NODE_ENV=development # This is required for the login cooke it work depends_on: cdp-portal-backend: condition: service_started diff --git a/docker/config/cdp-portal-frontend.env b/docker/config/cdp-portal-frontend.env index 9242a6d..1e81fc7 100644 --- a/docker/config/cdp-portal-frontend.env +++ b/docker/config/cdp-portal-frontend.env @@ -1,4 +1,4 @@ -APP_BASE_URL=http://localhost:3000 +APP_BASE_URL=http://cdp-portal-frontend:3000 USE_SINGLE_INSTANCE_CACHE=true TERMINAL_PROXY_URL=http://localhost:8085 NODE_ENV=development # This is required to ensure the login cookie is set as insecure, as we test over http diff --git a/docker/config/defaults.env b/docker/config/defaults.env index db9937b..6728132 100644 --- a/docker/config/defaults.env +++ b/docker/config/defaults.env @@ -23,7 +23,7 @@ TRUSTSTORE_CDP_ROOT_CA=LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUI5akNDQVYrZ0F3S AZURE_CLIENT_SECRET=test_value AZURE_TENANT_ID=63983fc2-cfff-45bb-8ec2-959e21062b9a OIDC_AUDIENCE=63983fc2-cfff-45bb-8ec2-959e21062b9a -OIDC_WELL_KNOWN_CONFIGURATION_URL=http://cdp.127.0.0.1.sslip.io:3939/63983fc2-cfff-45bb-8ec2-959e21062b9a/v2.0/.well-known/openid-configuration +OIDC_WELL_KNOWN_CONFIGURATION_URL=http://cdp-portal-stubs:3939/63983fc2-cfff-45bb-8ec2-959e21062b9a/v2.0/.well-known/openid-configuration GITHUB_BASE_URL=http://cdp-portal-stubs:3939 PORTAL_BACKEND_URL=http://cdp-portal-backend:5094 diff --git a/docker/scripts/mongodb/10-cdp-user-service-backend-users.js b/docker/scripts/mongodb/10-cdp-user-service-backend-users.js index d191891..f0279c9 100644 --- a/docker/scripts/mongodb/10-cdp-user-service-backend-users.js +++ b/docker/scripts/mongodb/10-cdp-user-service-backend-users.js @@ -15,6 +15,9 @@ db.users.updateOne( createdAt: "2023-10-26T12:51:00.028Z", updatedAt: "2023-10-26T12:51:00.028Z", teams: ["aabe63e7-87ef-4beb-a596-c810631fc474"], + scopes: [ + new ObjectId("6750708d454fcbbcc1568154") + ], }, }, { upsert: true } @@ -35,6 +38,7 @@ db.users.updateOne( createdAt: "2024-11-11T13:51:00.028Z", updatedAt: "2024-11-12T13:24:00.028Z", teams: ["44c7fa74-40e7-470d-a18a-b78a60bbef8e"], + scopes:[] }, }, { upsert: true } diff --git a/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js b/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js index 51b23d7..e35d272 100644 --- a/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js +++ b/docker/scripts/mongodb/15-cdp-user-service-backend-teams.js @@ -1,5 +1,44 @@ db = db.getSiblingDB("cdp-user-service-backend"); +db.scopes.updateOne( + { + value: "externalTest" + }, + { + $setOnInsert: { + _id: new ObjectId("674def9d30093e3a3aa49d35"), + userId: "90552794-0613-4023-819a-512aa9d40023", + value: "externalTest", + teams: [ + "aabe63e7-87ef-4beb-a596-c810631fc474" + ], + createdAt: "2024-12-02T17:34:21.295Z", + updatedAt: "2024-12-02T17:34:21.295Z" + }, + }, + { upsert: true } +); + +db.scopes.updateOne( + { + value: "breakglass" + }, + { + $setOnInsert: { + _id: new ObjectId("6750708d454fcbbcc1568154"), + userId: "90552794-0613-4023-819a-512aa9d40023", + value: "breakGlass", + teams: [ + ], + createdAt: "2024-12-02T17:34:21.295Z", + updatedAt: "2024-12-02T17:34:21.295Z" + }, + + }, + { upsert: true } +); + + db.teams.updateOne( { name: "Platform", @@ -11,6 +50,9 @@ db.teams.updateOne( description: "The team that runs the platform", github: "cdp-platform", users: ["90552794-0613-4023-819a-512aa9d40023"], + scopes: [ + new ObjectId("674def9d30093e3a3aa49d35") + ], createdAt: "2023-10-26T12:51:00.028Z", updatedAt: "2023-10-26T12:51:00.028Z", }, @@ -19,19 +61,20 @@ db.teams.updateOne( ); db.teams.updateOne( - { + { + name: "TenantTeam1", + }, + { + $setOnInsert: { + _id: "44c7fa74-40e7-470d-a18a-b78a60bbef8e", name: "TenantTeam1", + description: "A test team", + github: "cdp-tenant-1", + users: [], + scopes: [], + createdAt: "2024-10-26T12:51:00.028Z", + updatedAt: "2024-10-26T12:55:00.028Z", }, - { - $setOnInsert: { - _id: "44c7fa74-40e7-470d-a18a-b78a60bbef8e", - name: "TenantTeam1", - description: "A test team", - github: "cdp-tenant-1", - users: [], - createdAt: "2024-10-26T12:51:00.028Z", - updatedAt: "2024-10-26T12:55:00.028Z", - }, - }, - { upsert: true } + }, + { upsert: true } ); diff --git a/wdio.github.conf.js b/wdio.github.conf.js index 71e8f30..026ffd2 100644 --- a/wdio.github.conf.js +++ b/wdio.github.conf.js @@ -13,7 +13,7 @@ export const config = { // with `/`, the base url gets prepended, not including the path portion of your baseUrl. // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url // gets prepended directly. - baseUrl: `http://localhost:3000`, + baseUrl: `http://cdp-portal-frontend:3000`, // Connection to remote chromedriver hostname: process.env.CHROMEDRIVER_URL || '127.0.0.1', @@ -29,11 +29,6 @@ export const config = { { browserName: 'chrome', // Outbound calls must go via the proxy - proxy: { - proxyType: 'manual', - httpProxy: 'localhost:3128', - sslProxy: 'localhost:3128' - }, 'goog:chromeOptions': { args: [ '--no-sandbox',