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,