Skip to content

Commit 03b3b63

Browse files
committed
Fix incorrect authentikm url in cypress test
1 parent 050c087 commit 03b3b63

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

test/cypress/config/ci.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ 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',
1922
},
2023
baseUrl: 'http://localhost:1234',
2124
},

test/cypress/config/dev.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ module.exports = defineConfig({
1515
},
1616
env: {
1717
swaggerBase: '{{baseUrl}}/api/schema',
18+
authentik: 'http://authentik:9000',
19+
authentikLdap: 'authentik-ldap:3389',
20+
oauthRedirect: 'http://npm:81',
1821
},
1922
}
2023
});

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('LDAP with Authentik', () => {
1414
path: '/api/settings/ldap-auth',
1515
data: {
1616
value: {
17-
host: 'authentik-ldap:3389',
17+
host: Cypress.env('authentik-ldap'),
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ describe('OAuth with Authentik', () => {
1616
value: {
1717
client_id: 'U5gCy0ymU8OofWS4nmkAPugCbWkFkkPztap38ReD',
1818
client_secret: '9ZFClxwp7LzbfhIDk7k9DngQNQfwDAYqPrQMGXjFumCvQZATtXCwme20o0TnLP6uEHUkKqEFOInhxp01gVeaHCLW83iTK4PonoUnpFnXgyZAcu0H3zBxxOkVtRwACaoW',
19-
authorization_url: 'http://authentik-ldap:9000/application/o/authorize/',
20-
resource_url: 'http://authentik-ldap:9000/application/o/userinfo/',
21-
token_url: 'http://authentik-ldap:9000/application/o/token/',
22-
logout_url: 'http://authentik-ldap:9000/application/o/npm3/end-session/',
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/',
2323
identifier: 'preferred_username',
2424
scopes: [],
2525
auto_create_user: true
@@ -51,7 +51,7 @@ 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=http%3A%2F%2Ffullstack%3A81',
54+
path: '/oauth/login?redirect_base=' + encodeURI(Cypress.env('oauthRedirect')),
5555
}).then((data) => {
5656
expect(data).to.have.property('result');
5757
cy.visit(data.result);

0 commit comments

Comments
 (0)