badalprasadsingh commented on code in PR #2786:
URL: https://github.com/apache/iceberg-go/pull/2786#discussion_r4781241599
##########
catalog/catalogtest/catalogtest.go:
##########
Review Comment:
lets also mention RenamableViewCatalog so implementers know why the rename
cases skip
##########
catalog/catalogtest/views.go:
##########
@@ -241,3 +241,139 @@ func testDropNamespaceWithView(t *testing.T, cfg Config) {
require.NoError(t, err)
assert.True(t, exists, "view should still exist after a rejected
namespace drop")
}
+
+// newRenamableViewCatalog returns a fresh catalog from cfg and its view rename
+// capability. It skips the test when the catalog has no view support or
+// cannot rename views.
+func newRenamableViewCatalog(t *testing.T, cfg Config) (catalog.Catalog,
catalog.ViewCatalog, catalog.RenamableViewCatalog) {
+ t.Helper()
+
+ cat, views := newViewCatalog(t, cfg)
+ renamer, ok := catalog.As[catalog.RenamableViewCatalog](cat)
+ if !ok {
+ t.Skip("catalog does not implement
catalog.RenamableViewCatalog")
+ }
Review Comment:
a server that serves views but not POST `/v1/{prefix}/views/rename` fails
all five cases, as the rest client always implements `RenamableViewCatalog`->
though the package doc says view tests skip on ErrNotImplemented
better: lets probe like newViewCatalog and newRegisterableCatalog do (and
say so in the doc comment)
--
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]