Skip to content

Commit

Permalink
Make ucws tests skipped when DATABRICKS_ACCOUNT_ID is present (#448)
Browse files Browse the repository at this point in the history
## Changes
<!-- Summary of your changes that are easy to understand -->
- Added `skip_for_env` function and make all tests with `ucws` skip when
`DATABRICKS_ACCOUNT_ID` is present

## Tests
<!-- 
How is this tested? Please see the checklist below and also describe any
other relevant tests
-->
Verified that the ucws tests got skipped when running `make dev
integration`
- [ ] `make test` run locally
- [ ] `make fmt` applied
- [ ] relevant integration tests applied
  • Loading branch information
edwardfeng-db authored Nov 17, 2023
1 parent 86ca043 commit 5fc77b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def w(env_or_skip) -> WorkspaceClient:
def ucws(env_or_skip) -> WorkspaceClient:
_load_debug_env_if_runs_from_ide('ucws')
env_or_skip("CLOUD_ENV")
if 'DATABRICKS_ACCOUNT_ID' in os.environ:
pytest.skip("Skipping workspace test on account level")
if 'TEST_METASTORE_ID' not in os.environ:
pytest.skip("not in Unity Catalog Workspace test env")
return WorkspaceClient()
Expand Down

0 comments on commit 5fc77b0

Please sign in to comment.