NIFI-11545 Fixed test-all-dbs for Registry integration tests

This closes #7244

Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
nathluu 2023-05-13 22:32:31 +07:00 committed by exceptionfactory
parent 658f2547d8
commit 0308b5b404
No known key found for this signature in database
GPG Key ID: 29B6A52D2AAE8DBA
3 changed files with 9 additions and 10 deletions

View File

@ -367,7 +367,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange // Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "email"]) StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "email"])
OIDCTokenResponse mockResponse = mockOIDCTokenResponse() OIDCTokenResponse mockResponse = mockOIDCTokenResponse(["email": "person@nifi.apache.org"])
logger.info("OIDC Token Response: ${mockResponse.dump()}") logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act // Act
@ -403,7 +403,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange // Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "non-existent-claim"]) 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()}") logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act // Act
@ -438,7 +438,7 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
// Arrange // Arrange
StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "non-existent-claim"]) StandardOidcIdentityProvider soip = buildIdentityProviderWithMockTokenValidator(["getOidcClaimIdentifyingUser": "non-existent-claim"])
OIDCTokenResponse mockResponse = mockOIDCTokenResponse(["email": null]) OIDCTokenResponse mockResponse = mockOIDCTokenResponse()
logger.info("OIDC Token Response: ${mockResponse.dump()}") logger.info("OIDC Token Response: ${mockResponse.dump()}")
// Act // Act
@ -533,7 +533,6 @@ class StandardOidcIdentityProviderGroovyIT extends GroovyTestCase {
"azp" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com", "azp" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com",
"aud" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com", "aud" : "1013352044499-05pb1ssdfuihsdfsdsdfdi8r2vike88m.apps.googleusercontent.com",
"sub" : "10703475345439756345540", "sub" : "10703475345439756345540",
"email" : "person@nifi.apache.org",
"email_verified": "true", "email_verified": "true",
"at_hash" : "JOGISUDHFiyGHDSFwV5Fah2A", "at_hash" : "JOGISUDHFiyGHDSFwV5Fah2A",
"iat" : 1590022674, "iat" : 1590022674,

View File

@ -17,10 +17,10 @@
package org.apache.nifi.registry.web.api; package org.apache.nifi.registry.web.api;
import org.apache.nifi.registry.NiFiRegistryTestApiApplication; 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.boot.test.context.SpringBootTest;
import org.springframework.test.context.jdbc.Sql; 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: * 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 * - 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 * - Custom SQL is clearing the DB before each test method by default, unless method overrides this behavior
*/ */
@RunWith(SpringRunner.class) @ExtendWith(SpringExtension.class)
@SpringBootTest( @SpringBootTest(
classes = NiFiRegistryTestApiApplication.class, classes = NiFiRegistryTestApiApplication.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,

View File

@ -17,10 +17,10 @@
package org.apache.nifi.registry.web.api; package org.apache.nifi.registry.web.api;
import org.apache.nifi.registry.NiFiRegistryTestApiApplication; 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.boot.test.context.SpringBootTest;
import org.springframework.test.context.jdbc.Sql; 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: * 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 * - 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 * - Custom SQL is clearing the DB before each test method by default, unless method overrides this behavior
*/ */
@RunWith(SpringRunner.class) @ExtendWith(SpringExtension.class)
@SpringBootTest( @SpringBootTest(
classes = NiFiRegistryTestApiApplication.class, classes = NiFiRegistryTestApiApplication.class,
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,