This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 4c9ce15ce2 [MINOR]test(IRC): Fix testUpdateNamespace to correctly test
schema owner case (#10022)
4c9ce15ce2 is described below
commit 4c9ce15ce208267679397764dcfde9a08d031a2b
Author: Bharath Krishna <[email protected]>
AuthorDate: Wed Feb 25 09:01:03 2026 +0530
[MINOR]test(IRC): Fix testUpdateNamespace to correctly test schema owner
case (#10022)
### What changes were proposed in this pull request?
Current test was incorrect. It was using catalogClientWithAllPrivilege
to run the alterSchema, which runs as admin user, and not as the
NORMAL_USER to test schema ownership. catalogClientWithAllPrivilege runs
as admin user which will anyways pass, irrespective of setting owner to
NORMAL_USER
### Why are the changes needed?
Fixes incorrect test
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Fix integration test
---
.../iceberg/integration/test/IcebergNamespaceAuthorizationIT.java | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergNamespaceAuthorizationIT.java
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergNamespaceAuthorizationIT.java
index 2265ae50dc..b8106b09e6 100644
---
a/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergNamespaceAuthorizationIT.java
+++
b/iceberg/iceberg-rest-server/src/test/java/org/apache/gravitino/iceberg/integration/test/IcebergNamespaceAuthorizationIT.java
@@ -28,7 +28,6 @@ import java.util.Optional;
import java.util.UUID;
import org.apache.gravitino.MetadataObject;
import org.apache.gravitino.MetadataObjects;
-import org.apache.gravitino.SchemaChange;
import org.apache.gravitino.authorization.Owner;
import org.apache.gravitino.authorization.Privileges;
import org.apache.gravitino.authorization.SecurableObject;
@@ -216,13 +215,8 @@ public class IcebergNamespaceAuthorizationIT extends
IcebergAuthorizationIT {
NORMAL_USER,
Owner.Type.USER);
- grantUseSchemaRole(namespace);
-
Assertions.assertDoesNotThrow(
- () ->
- catalogClientWithAllPrivilege
- .asSchemas()
- .alterSchema(namespace,
SchemaChange.setProperty("modified-by", "owner")));
+ () -> sql("ALTER DATABASE %s SET DBPROPERTIES ('key'='value')",
namespace));
}
@Test