nastra commented on code in PR #13400:
URL: https://github.com/apache/iceberg/pull/13400#discussion_r2559682093
##########
core/src/test/java/org/apache/iceberg/rest/TestResourcePaths.java:
##########
@@ -179,4 +179,60 @@ public void viewWithMultipartNamespace() {
assertThat(withPrefix.view(ident)).isEqualTo("v1/ws/catalog/namespaces/n%1Fs/views/view-name");
assertThat(withoutPrefix.view(ident)).isEqualTo("v1/namespaces/n%1Fs/views/view-name");
}
+
+ @Test
+ public void planEndpointPath() {
+ TableIdentifier tableId = TableIdentifier.of("test_namespace",
"test_table");
+ ResourcePaths paths = new ResourcePaths("test-prefix");
+
+ String submitPlanPath = paths.planTableScan(tableId);
+
+ assertThat(submitPlanPath)
+
.isEqualTo("v1/test-prefix/namespaces/test_namespace/tables/test_table/plan");
+
+ // Test with different identifiers
+ TableIdentifier complexId = TableIdentifier.of(Namespace.of("db",
"schema"), "my_table");
+ String complexPath = paths.planTableScan(complexId);
+
+
assertThat(complexPath).isEqualTo("v1/test-prefix/namespaces/db%1Fschema/tables/my_table/plan");
+ }
+
+ @Test
+ public void fetchScanTasks() {
+ TableIdentifier tableId = TableIdentifier.of("test_namespace",
"test_table");
+ ResourcePaths paths = new ResourcePaths("test-prefix");
+
+ // Test that the cancel plan path is generated correctly
+ String cancelPath = paths.fetchScanTasks(tableId);
Review Comment:
isn't that the `fetchScanTasksPath`?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]