Skip to content

Commit

Permalink
Native test doesn't work with @Mock so working around it
Browse files Browse the repository at this point in the history
  • Loading branch information
FroMage committed Apr 26, 2022
1 parent 79166e1 commit f4f24fb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ public Uni<List<Authenticator>> findWebAuthnCredentialsByCredID(String credID) {
@ReactiveTransactional
@Override
public Uni<Void> updateOrStoreWebAuthnCredentials(Authenticator authenticator) {
// leave the scooby user to the manual endpoint, because if we do it here it will be
// created/udated twice
if(authenticator.getUserName().equals("scooby"))
return Uni.createFrom().nullItem();
return User.findByUserName(authenticator.getUserName())
.flatMap(user -> {
// new user
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.acme.security.webauthn.test;

import io.quarkus.test.junit.NativeImageTest;
import io.quarkus.test.junit.QuarkusIntegrationTest;

@NativeImageTest
@QuarkusIntegrationTest
public class NativeWebAuthnResourceIT extends WebAuthnResourceTest {

// Execute the same tests but in native mode.
Expand Down

This file was deleted.

0 comments on commit f4f24fb

Please sign in to comment.