Skip to content
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

set purview name environment variable in workflow #956

Merged
merged 7 commits into from
Jan 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request_push_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ jobs:
AZURE_CLIENT_ID: ${{secrets.AZURE_CLIENT_ID}}
AZURE_TENANT_ID: ${{secrets.AZURE_TENANT_ID}}
AZURE_CLIENT_SECRET: ${{secrets.AZURE_CLIENT_SECRET}}
PURVIEW_NAME: ${{secrets.PURVIEW_NAME}}
PURVIEW_NAME: "feathrazuretest3-purview1"
CONNECTION_STR: ${{secrets.CONNECTION_STR}}
run: |
pytest --cov-report term-missing --cov=registry/sql-registry/registry --cov-config=registry/test/.coveragerc registry/test/test_sql_registry.py
Expand Down
5 changes: 3 additions & 2 deletions registry/test/test_purview_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ def setup(self):
purview_name = os.getenv('PURVIEW_NAME')
if purview_name is None:
raise RuntimeError("Failed to run Purview registry test case. Cannot get environment variable: 'PURVIEW_NAME'")

self.registry = PurviewRegistry(purview_name)

def cleanup(self, ids):
Expand All @@ -23,7 +24,6 @@ def create_and_get_project(self, project_name):
assert project_id is not None
project = self.registry.get_entity(project_id)
assert project.qualified_name == project_name
assert self.registry.get_entity_id(project_name) == str(project_id)
return project_id

def create_and_get_data_source(self, project_id, qualified_name, name, path, type):
Expand Down Expand Up @@ -71,7 +71,8 @@ def test_registry(self):
project_id = self.create_and_get_project(project_name)
# re-create project, should return the same id
id = self.registry.create_project(ProjectDef(project_name))
assert project_id == id
assert project_id == id
assert self.registry.get_entity_id(project_name) == str(project_id)
projects = self.registry.get_projects()
assert len(projects) >= 1
project_ids = self.registry.get_projects_ids()
Expand Down