From 1d81a61cbf2e88ec7d2bb6d03a0c37f96dc049b3 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Tue, 3 Sep 2024 22:53:33 +0000 Subject: [PATCH 1/2] testing: remove testing identity override This PR removes a stale reference to a membership group in samples tests. --- samples/snippets/view_test.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/snippets/view_test.py b/samples/snippets/view_test.py index dfa1cdeee..d46595695 100644 --- a/samples/snippets/view_test.py +++ b/samples/snippets/view_test.py @@ -114,7 +114,6 @@ def test_view( project_id, dataset_id, table_id = view_id.split(".") overrides: view.OverridesDict = { - "analyst_group_email": "cloud-dpes-bigquery@google.com", "view_dataset_id": view_dataset_id, "source_dataset_id": source_dataset_id, "view_reference": { @@ -127,5 +126,5 @@ def test_view( assert len(view_dataset.access_entries) != 0 assert len(source_dataset.access_entries) != 0 out, _ = capsys.readouterr() - assert "cloud-dpes-bigquery@google.com" in out + assert "example-analyst-group@google.com" in out assert table_id in out From 242b51d92a14814ebe276dd72bab5a58ddfd7f05 Mon Sep 17 00:00:00 2001 From: Seth Hollyman Date: Tue, 3 Sep 2024 23:13:03 +0000 Subject: [PATCH 2/2] update example group --- samples/snippets/view.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/snippets/view.py b/samples/snippets/view.py index 94f406890..30e719c79 100644 --- a/samples/snippets/view.py +++ b/samples/snippets/view.py @@ -147,7 +147,7 @@ def grant_access( # Make an API request to get the view dataset ACLs. view_dataset = client.get_dataset(view_dataset_id) - analyst_group_email = "data_analysts@example.com" + analyst_group_email = "example-analyst-group@google.com" # [END bigquery_grant_view_access] # To facilitate testing, we replace values with alternatives # provided by the testing harness.