-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix OpenShift scenario in security/webauthn application starts before Mysql container database is ready #1500
Labels
priority/moderate
Issue that needs to be worked on after all 'high' issues are done.
Comments
jcarranzan
added a commit
to jcarranzan/quarkus-test-suite
that referenced
this issue
Nov 3, 2023
jcarranzan
added a commit
to jcarranzan/quarkus-test-suite
that referenced
this issue
Nov 3, 2023
create quarkus webauthn code with reactive mysql client and compose yaml do some tweaks and add init.sql delete files not needed in the module for quarkus test suite delete docker files not needed in the module for quarkus test suite modify Readme fix some annotation and create src/test add security/webauthn module add LoginResource class remove init.sql and modify mysql.properties create WebAuthnCredential method to associate with the User add method to associate with WebAuthnCredential to the new User add logOut tests variable more descriptive use vertx HttpClient for testing purposes and rename of xc5 variables remove when from rest assured and add indentation delete uncecessary dependencies register a User with VirtualAuthenticator and selenium add dependencies needed for selenium and also jupiter junit add AbstractWebAuthnPlaywright example add WebDriverWait wait variable fix pom conflicts close http client and vertx to prevent leaks use MySqlService parameters withProperties create basic tests on AbstractWebAuthnTest remove classes not needed for now add failed testRegisterSameUserShouldNotAllowed change assertThat on testRegisterSameUserShouldNotAllowed add AdminResource add properties as static final and remove restAssured check from setUp use upstream mysql80 image call onSuccess after http.requests add MyWebAuthnHardware class tweak logic with all methods and parameters needed to register a user add methods invokeRegistration and invokeCallback needed in the user registration with mysql.80.image tests works add openshift tests add logoutUser method tweak to new user credential persist add security/webauthn to README refactor name method remove UTF8 propery drom mysql.properties add cbor library add admin checks use the getApp().getHost() instead of localhost improve security/webauthn description in README add some method order and another tweaks drop jackson-cbor version change deprecate getApp().getHost() method rename class to OpenShiftWebAuthnIT to be included according maven pattern configuration change expectedLog change localhost rpDomain to app.getUri() remove drop and create from mysql.properties add properties quarkus.build.skip fix regex header because failed on openshift add TODO on OpenShift scenario with issue quarkus-qe#1500
jcarranzan
added a commit
to jcarranzan/quarkus-test-suite
that referenced
this issue
Nov 3, 2023
create quarkus webauthn code with reactive mysql client and compose yaml do some tweaks and add init.sql delete files not needed in the module for quarkus test suite delete docker files not needed in the module for quarkus test suite modify Readme fix some annotation and create src/test add security/webauthn module add LoginResource class remove init.sql and modify mysql.properties create WebAuthnCredential method to associate with the User add method to associate with WebAuthnCredential to the new User add logOut tests variable more descriptive use vertx HttpClient for testing purposes and rename of xc5 variables remove when from rest assured and add indentation delete uncecessary dependencies register a User with VirtualAuthenticator and selenium add dependencies needed for selenium and also jupiter junit add AbstractWebAuthnPlaywright example add WebDriverWait wait variable fix pom conflicts close http client and vertx to prevent leaks use MySqlService parameters withProperties create basic tests on AbstractWebAuthnTest remove classes not needed for now add failed testRegisterSameUserShouldNotAllowed change assertThat on testRegisterSameUserShouldNotAllowed add AdminResource add properties as static final and remove restAssured check from setUp use upstream mysql80 image call onSuccess after http.requests add MyWebAuthnHardware class tweak logic with all methods and parameters needed to register a user add methods invokeRegistration and invokeCallback needed in the user registration with mysql.80.image tests works add openshift tests add logoutUser method tweak to new user credential persist add security/webauthn to README refactor name method remove UTF8 propery drom mysql.properties add cbor library add admin checks use the getApp().getHost() instead of localhost improve security/webauthn description in README add some method order and another tweaks drop jackson-cbor version change deprecate getApp().getHost() method rename class to OpenShiftWebAuthnIT to be included according maven pattern configuration change expectedLog change localhost rpDomain to app.getUri() remove drop and create from mysql.properties add properties quarkus.build.skip fix regex header because failed on openshift add TODO on OpenShift scenario with issue quarkus-qe#1500 disabled OpenShiftScenario and call to ADMIN endpoint to get 404 status move the tests to the package io.quarkus.ts.security.webauthn
jcarranzan
added
the
priority/moderate
Issue that needs to be worked on after all 'high' issues are done.
label
Nov 20, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a quarkus application with a reactive Mysql database container :
https://github.com/jcarranzan/quarkus-test-suite/tree/webauthn-mysql-backup/security/webauthn
When I run the tests on bare metal the tests pass successfully but if I run on OCP the Quarkus application starts before the Mysql container database is ready.
Steps to reproduce:
mvn clean verify -Dopenshift -Dit.test=OpenShiftWebAuthnIT
It seems there is a weird behavior with the
expectedLog = "Only MySQL server logs after this point"
variable parameterized in @container annotation.Workaround but not a fix:
It would be put some wait on the RestService application with some time defined, for instance:
.onPreStart(new Action() { @Override public void handle(Service service) { try { Thread.sleep(Duration.ofSeconds(5).toMillis()); } catch (InterruptedException e) { throw new RuntimeException(e); } } })
Faulires logs output:
` INFO [app] 15:56:43,216 HTTP Request to /q/webauthn/register failed, error id: d5853774-7b01-4a13-bc4a-d4e77ab1351e-2: io.vertx.sqlclient.ClosedConnectionException: Failed to read any response from the server, the underlying connection may have been lost unexpectedly.
[ERROR] OpenShiftWebAuthnIT.testRegisterWebAuthnUser -- Time elapsed: 26.37 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <200> but was <500>.
[ERROR] OpenShiftWebAuthnIT.testRegisterSameUserName -- Time elapsed: 18.33 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
Expected status code <200> but was <500>.
[ERROR] OpenShiftWebAuthnIT.testFailLoginWithFakeRegisterUser -- Time elapsed: 8.278 s <<< FAILURE!
java.lang.AssertionError:
1 expectation failed.
No cookies defined in the response
`
The text was updated successfully, but these errors were encountered: