test: add explicit credentials and project to test (#1372) · googleapis/python-spanner@1d36f4d · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 1d36f4d

Browse files
test: add explicit credentials and project to test (#1372)
* test: add explicit credentials and project to test Tests need to be able to run in environments without any default credentials. This requires the test to explictly set the credentials and the project that should be used. * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 064d9dc commit 1d36f4d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.kokoro/presubmit/presubmit.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3-
# Only run a subset of all nox sessions
3+
# Disable system tests.
44
env_vars: {
5-
key: "NOX_SESSION"
6-
value: "unit-3.8 unit-3.12 cover docs docfx"
5+
key: "RUN_SYSTEM_TESTS"
6+
value: "false"
77
}

tests/unit/spanner_dbapi/test_connection.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,14 @@ def test_custom_database_role(self):
830830
from google.cloud.spanner_dbapi import connect
831831

832832
role = "some_role"
833-
connection = connect("test-instance", "test-database", database_role=role)
833+
connection = connect(
834+
"test-instance",
835+
"test-database",
836+
project="test-project",
837+
database_role=role,
838+
credentials=AnonymousCredentials(),
839+
client_options={"api_endpoint": "none"},
840+
)
834841
self.assertEqual(connection.database.database_role, role)
835842

836843
def test_invalid_custom_client_connection(self):

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.