dimas-b commented on code in PR #4841:
URL: https://github.com/apache/polaris/pull/4841#discussion_r3443670804
##########
integration-tests/src/main/java/org/apache/polaris/service/it/env/MetricsApi.java:
##########
@@ -33,12 +32,15 @@
import org.hawkular.agent.prometheus.types.MetricFamily;
import org.hawkular.agent.prometheus.walkers.CollectorPrometheusMetricsWalker;
-/** Utils for working with metrics in tests */
-public class TestMetricsUtil {
+public class MetricsApi extends RestApi {
Review Comment:
nit: maybe `RuntimeMetricsApi`?.. to avoid confusion with Iceberg
Scan/Commit Metrics API in #4115.
##########
integration-tests/src/test/java/org/apache/polaris/service/it/env/PolarisApiEndpointsTest.java:
##########
@@ -18,19 +18,99 @@
*/
package org.apache.polaris.service.it.env;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
import java.net.URI;
-import org.junit.jupiter.api.Assertions;
+import java.util.Map;
import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.CsvSource;
/** Unit tests for PolarisApiEndpoints */
public class PolarisApiEndpointsTest {
+
+ @ParameterizedTest
+ @CsvSource({
+ "https://myserver.com , https://myserver.com/api/catalog",
+ "https://myserver.com/ , https://myserver.com/api/catalog",
+ "https://myserver.com/polaris , https://myserver.com/polaris/api/catalog",
+ "https://myserver.com/polaris/ , https://myserver.com/polaris/api/catalog"
+ })
+ void testCatalogApiEndpoint(URI baseUri, URI expectedUri) {
+ PolarisApiEndpoints endpoints =
+ new PolarisApiEndpoints(
+ baseUri, URI.create("https://myserver.com/irrelevant"), "realm1",
Map.of());
Review Comment:
nit: `example.com`
--
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]