Add failing a test for verifying that Krill starts up even if the OpenID Connect provider is unavailable.

This commit is contained in:
Ximon Eighteen
2021-01-05 12:21:23 +01:00
parent 78630a719d
commit 76eb78f5a5
3 changed files with 39 additions and 0 deletions
@@ -0,0 +1,12 @@
data_dir = "/tmp/krill"
service_uri = "https://localhost:3000/"
log_level = "trace"
log_type = "stderr"
auth_type = "openid-connect"
auth_token = "secret"
[auth_openidconnect]
issuer_url = "http://localhost:1818"
client_id = "client-id-123"
client_secret = "some-secret"
@@ -0,0 +1,8 @@
#[cfg(feature = "ui-tests")]
mod ui;
#[tokio::test]
#[cfg(all(feature = "ui-tests", feature = "multi-user"))]
async fn multi_user_openid_connect_provider_not_available_test() {
ui::run_krill_ui_test("multi_user_openid_connect_provider_not_available", false, false).await
}
@@ -0,0 +1,19 @@
describe('OpenID Connect users', () => {
it('The correct login form is shown', () => {
cy.intercept('GET', '/api/v1/authorized').as('isAuthorized')
cy.intercept('GET', '/auth/login').as('getLoginURL')
cy.intercept('GET', /^http:\/\/localhost:1818\/authorize.+/).as('oidcLoginForm')
cy.visit('/')
cy.wait(['@isAuthorized', '@getLoginURL', '@oidcLoginForm'])
// // make sure we haven't been redirected away from Krill (as would be the
// // case if an OpenID Connect login form were shown)
// cy.url().should('not.include', Cypress.config('baseUrl'))
// // make sure that this is our mock OpenID Connect provider
// cy.contains('Mock OpenID Connect login form')
// // check that a username input field is shown on the page
// cy.get('input[name="username"]')
})
})