dimas-b commented on code in PR #987:
URL: https://github.com/apache/polaris/pull/987#discussion_r1968569190
##########
integration-tests/src/main/java/org/apache/polaris/service/it/test/PolarisApplicationIntegrationTest.java:
##########
@@ -118,25 +118,26 @@ public class PolarisApplicationIntegrationTest {
private static ClientCredentials clientCredentials;
private static ClientPrincipal admin;
private static String authToken;
+ private static URI baseLocation;
private String principalRoleName;
private String internalCatalogName;
@BeforeAll
- public static void setup(PolarisApiEndpoints apiEndpoints, ClientPrincipal
adminCredentials)
- throws IOException {
+ public static void setup(
+ PolarisApiEndpoints apiEndpoints, ClientPrincipal adminCredentials,
@TempDir Path tempDir) {
endpoints = apiEndpoints;
client = polarisClient(endpoints);
realm = endpoints.realmId();
admin = adminCredentials;
clientCredentials = adminCredentials.credentials();
authToken = client.obtainToken(clientCredentials);
-
- testDir = Path.of("build/test_data/iceberg/" + realm);
- FileUtils.deleteQuietly(testDir.toFile());
- Files.createDirectories(testDir);
-
managementApi = client.managementApi(clientCredentials);
+ baseLocation =
+ Optional.ofNullable(System.getenv("INTEGRATION_TEST_TEMP_DIR"))
+ .map(URI::create)
+ .orElse(tempDir.toUri())
+ .resolve(realm + "/");
Review Comment:
Good point. I think we can assume that Polaris test use only well-formed
URIs as base locations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]