Skip to content

Commit a856c4d

Browse files
committed
Use new instance of autentik db made in dev
1 parent 2f334b5 commit a856c4d

File tree

6 files changed

+19
-21
lines changed

6 files changed

+19
-21
lines changed

docker/ci/postgres/authentik.sql.gz

-47.1 KB
Binary file not shown.

docker/docker-compose.ci.postgres.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ services:
4444
- redis_vol:/data
4545

4646
authentik:
47-
image: ghcr.io/goauthentik/server:2024.8.3
47+
image: ghcr.io/goauthentik/server:2024.10.1
4848
restart: unless-stopped
4949
command: server
5050
env_file:
@@ -54,7 +54,7 @@ services:
5454
- db-postgres
5555

5656
authentik-worker:
57-
image: ghcr.io/goauthentik/server:2024.8.3
57+
image: ghcr.io/goauthentik/server:2024.10.1
5858
restart: unless-stopped
5959
command: worker
6060
env_file:
@@ -64,11 +64,11 @@ services:
6464
- db-postgres
6565

6666
authentik-ldap:
67-
image: ghcr.io/goauthentik/ldap
67+
image: ghcr.io/goauthentik/ldap:2024.10.1
6868
environment:
6969
AUTHENTIK_HOST: 'http://authentik:9000'
7070
AUTHENTIK_INSECURE: 'true'
71-
AUTHENTIK_TOKEN: '1N7z2r5PZrNBauuyDZSnlhU4gPSih7bkooIgqbvhzBbrA1MGYyDGZmBasJqU'
71+
AUTHENTIK_TOKEN: 'wKYZuRcI0ETtb8vWzMCr04oNbhrQUUICy89hSpDln1OEKLjiNEuQ51044Vkp'
7272
restart: unless-stopped
7373
depends_on:
7474
- authentik

test/cypress/config/ci.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ module.exports = defineConfig({
1616
},
1717
env: {
1818
swaggerBase: '{{baseUrl}}/api/schema',
19-
authentik: 'http://authentik:9000',
20-
authentikLdap: 'authentik-ldap:3389',
21-
oauthRedirect: 'http://fullstack:81',
2219
},
2320
baseUrl: 'http://localhost:1234',
2421
},

test/cypress/config/dev.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ module.exports = defineConfig({
77
reporterOptions: {
88
configFile: 'multi-reporter.json'
99
},
10-
video: false,
10+
video: true,
11+
videosFolder: 'results/videos',
1112
screenshotsFolder: 'results/screenshots',
1213
e2e: {
1314
setupNodeEvents(on, config) {
1415
return require('../plugins/index.js')(on, config);
1516
},
1617
env: {
1718
swaggerBase: '{{baseUrl}}/api/schema',
18-
authentik: 'http://authentik:9000',
19-
authentikLdap: 'authentik-ldap:3389',
20-
oauthRedirect: 'http://npm:81',
19+
skipStackCheck: 'true',
2120
},
2221
}
2322
});

test/cypress/e2e/api/Ldap.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe('LDAP with Authentik', () => {
44
let token;
5-
if (Cypress.env('stack') === 'postgres') {
5+
if (Cypress.env('skipStackCheck') === 'true' || Cypress.env('stack') === 'postgres') {
66

77
before(() => {
88
cy.resetUsers();
@@ -14,7 +14,7 @@ describe('LDAP with Authentik', () => {
1414
path: '/api/settings/ldap-auth',
1515
data: {
1616
value: {
17-
host: Cypress.env('authentik-ldap'),
17+
host: 'authentik-ldap:3389',
1818
base_dn: 'ou=users,DC=ldap,DC=goauthentik,DC=io',
1919
user_dn: 'cn={{USERNAME}},ou=users,DC=ldap,DC=goauthentik,DC=io',
2020
email_property: 'mail',

test/cypress/e2e/api/OAuth.cy.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe('OAuth with Authentik', () => {
44
let token;
5-
if (Cypress.env('stack') === 'postgres') {
5+
if (Cypress.env('skipStackCheck') === 'true' || Cypress.env('stack') === 'postgres') {
66

77
before(() => {
88
cy.resetUsers();
@@ -14,12 +14,12 @@ describe('OAuth with Authentik', () => {
1414
path: '/api/settings/oauth-auth',
1515
data: {
1616
value: {
17-
client_id: 'U5gCy0ymU8OofWS4nmkAPugCbWkFkkPztap38ReD',
18-
client_secret: '9ZFClxwp7LzbfhIDk7k9DngQNQfwDAYqPrQMGXjFumCvQZATtXCwme20o0TnLP6uEHUkKqEFOInhxp01gVeaHCLW83iTK4PonoUnpFnXgyZAcu0H3zBxxOkVtRwACaoW',
19-
authorization_url: Cypress.env('authentik') + '/application/o/authorize/',
20-
resource_url: Cypress.env('authentik') + '/application/o/userinfo/',
21-
token_url: Cypress.env('authentik') + '/application/o/token/',
22-
logout_url: Cypress.env('authentik') + '/application/o/npm3/end-session/',
17+
client_id: '7iO2AvuUp9JxiSVkCcjiIbQn4mHmUMBj7yU8EjqU',
18+
client_secret: 'VUMZzaGTrmXJ8PLksyqzyZ6lrtz04VvejFhPMBP9hGZNCMrn2LLBanySs4ta7XGrDr05xexPyZT1XThaf4ubg00WqvHRVvlu4Naa1aMootNmSRx3VAk6RSslUJmGyHzq',
19+
authorization_url: 'http://authentik:9000/application/o/authorize/',
20+
resource_url: 'http://authentik:9000/application/o/userinfo/',
21+
token_url: 'http://authentik:9000/application/o/token/',
22+
logout_url: 'http://authentik:9000/application/o/npm/end-session/',
2323
identifier: 'preferred_username',
2424
scopes: [],
2525
auto_create_user: true
@@ -51,14 +51,16 @@ describe('OAuth with Authentik', () => {
5151
it('Should log in with OAuth', function() {
5252
cy.task('backendApiGet', {
5353
token: token,
54-
path: '/oauth/login?redirect_base=' + encodeURI(Cypress.env('oauthRedirect')),
54+
path: '/oauth/login?redirect_base=' + encodeURI('http://fullstack:81'),
5555
}).then((data) => {
5656
expect(data).to.have.property('result');
5757
cy.visit(data.result);
5858
cy.get('input[name="uidField"]').type('cypress');
5959
cy.get('button[type="submit"]').click();
6060
cy.get('input[name="password"]').type('fqXBfUYqHvYqiwBHWW7f');
6161
cy.get('button[type="submit"]').click();
62+
// confirmation page
63+
cy.get('button[type="submit"]').click();
6264
cy.url().should('match', /fullstack/)
6365
});
6466
});

0 commit comments

Comments
 (0)