You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ex...@apache.org on 2023/05/15 15:30:50 UTC
[nifi] branch main updated: NIFI-11545 Fixed test-all-dbs for Registry integration tests
This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 0308b5b404 NIFI-11545 Fixed test-all-dbs for Registry integration tests
0308b5b404 is described below
commit 0308b5b404d99aa97166e11586ab348a8456b6d6
Author: nathluu <lu...@gmail.com>
AuthorDate: Sat May 13 22:32:31 2023 +0700
NIFI-11545 Fixed test-all-dbs for Registry integration tests
This closes #7244
Signed-off-by: David Handermann <ex...@apache.org>
---
.../oidc/StandardOidcIdentityProviderGroovyIT.groovy | 7 +++----
.../java/org/apache/nifi/registry/web/api/UnsecuredITBase.java | 6 +++---
.../apache/nifi/registry/web/api/UnsecuredNoRevisionsITBase.java | 6 +++---
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/groovy/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProviderGroovyIT.groovy b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/groovy/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProviderGroovyIT.groovy
index a7196b55bf..e58c16a31f 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/groovy/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProviderGroovyIT.groovy
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/groovy/org/apache/nifi/registry/web/security/authentication/oidc/StandardOidcIdentityProviderGroovyIT.groovy
@@ -367,7 +367,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "email"])
- OIDCTokenResponse mockResponse = mockOIDCTokenResponse()
+ OIDCTokenResponse mockResponse = mockOIDCTokenResponse(["email": "person@nifi.apache.org"])
logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act
@@ -403,7 +403,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "non-existent-claim"])
- OIDCTokenResponse mockResponse = mockOIDCTokenResponse()
+ OIDCTokenResponse mockResponse = mockOIDCTokenResponse(["email": "person@nifi.apache.org"])
logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act
@@ -438,7 +438,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "non-existent-claim"])
- OIDCTokenResponse mockResponse = mockOIDCTokenResponse(["email": null])
+ OIDCTokenResponse mockResponse = mockOIDCTokenResponse()
logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act
@@ -533,7 +533,6 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
"azp" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com",
"aud" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com",
"sub" : "10703475345439756345540",
- "email" : "person@nifi.apache.org",
"email_verified": "true",
"at_hash" : "JOGISUDHFiyGHDSFwV5Fah2A",
"iat" : 1590022674,
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredITBase.java b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredITBase.java
index a0c981b22a..ecfc84dc53 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredITBase.java
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredITBase.java
@@ -17,10 +17,10 @@
package org.apache.nifi.registry.web.api;
import org.apache.nifi.registry.NiFiRegistryTestApiApplication;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.jdbc.Sql;
-import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
/**
* Deploy the Web API Application using an embedded Jetty Server for local integration testing, with the follow characteristics:
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* - The database is embed H2 using volatile (in-memory) persistence
* - Custom SQL is clearing the DB before each test method by default, unless method overrides this behavior
*/
-@RunWith(SpringRunner.class)
+@ExtendWith(SpringExtension.class)
@SpringBootTest(
classes = NiFiRegistryTestApiApplication.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredNoRevisionsITBase.java b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredNoRevisionsITBase.java
index cabe25edc7..21ea067f9e 100644
--- a/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredNoRevisionsITBase.java
+++ b/nifi-registry/nifi-registry-core/nifi-registry-web-api/src/test/java/org/apache/nifi/registry/web/api/UnsecuredNoRevisionsITBase.java
@@ -17,10 +17,10 @@
package org.apache.nifi.registry.web.api;
import org.apache.nifi.registry.NiFiRegistryTestApiApplication;
-import org.junit.runner.RunWith;
+import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.jdbc.Sql;
-import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
/**
* Deploy the Web API Application using an embedded Jetty Server for local integration testing, with the follow characteristics:
@@ -29,7 +29,7 @@ import org.springframework.test.context.junit4.SpringRunner;
* - The database is embed H2 using volatile (in-memory) persistence
* - Custom SQL is clearing the DB before each test method by default, unless method overrides this behavior
*/
-@RunWith(SpringRunner.class)
+@ExtendWith(SpringExtension.class)
@SpringBootTest(
classes = NiFiRegistryTestApiApplication.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,