-
Notifications
You must be signed in to change notification settings - Fork 331
Service: Add location tests for views #2496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive test coverage for location validation of Iceberg views, ensuring that views respect allowed location constraints similar to tables.
- Adds two new test methods that verify view creation and updates within and outside allowed locations
- Introduces supporting test infrastructure including view constants and helper methods
- Imports necessary dependencies for view testing functionality
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| createCatalog(services, Map.of(), catalogBaseLocation, List.of(catalogBaseLocation)); | ||
| createNamespace(services, namespaceLocation); | ||
|
|
||
| var locationNotAllowed = Paths.get(tmpDir.toUri().toString()).toString(); |
Copilot
AI
Sep 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converting URI to string and then back to Path is unnecessary. Use tmpDir.toAbsolutePath().toString() directly for consistency with other location variables in the test.
| var locationNotAllowed = Paths.get(tmpDir.toUri().toString()).toString(); | |
| var locationNotAllowed = tmpDir.toAbsolutePath().toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this comment makes sense to me... however, the code suggestion probably needs to be tmpDir.toAbsolutePath().toUri().toString() to match line 208.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using this to make it more explicitly
tmpDir.resolve("location-not-allowed").toAbsolutePath().toUri().toString();
|
The test failure isn't related It seems a flaky test introduced by #1844. cc @adnanhemani |
No description provided.