Skip to content

Commit 0a9f8d9

Browse files
authored
fix(auth/service-to-service): Update to current best practices/versions (GoogleCloudPlatform#13134)
* fix: update function to current Python * fix: ensure service and function are uniquely named * gen2 by default * rename all the places
1 parent 4e0938f commit 0a9f8d9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

auth/service-to-service/auth_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,11 @@ def services():
7272
"gcloud",
7373
"functions",
7474
"deploy",
75-
f"helloworld-{suffix}",
75+
f"helloworld-fn-{suffix}",
7676
"--project",
7777
project,
78-
"--runtime=python38",
78+
"--gen2",
79+
"--runtime=python312",
7980
"--region=us-central1",
8081
"--trigger-http",
8182
"--no-allow-unauthenticated",
@@ -86,7 +87,7 @@ def services():
8687
)
8788

8889
function_url = (
89-
f"https://us-central1-{project}.cloudfunctions.net/helloworld-{suffix}"
90+
f"https://us-central1-{project}.cloudfunctions.net/helloworld-fn-{suffix}"
9091
)
9192

9293
token = subprocess.run(
@@ -117,7 +118,7 @@ def services():
117118
"gcloud",
118119
"functions",
119120
"delete",
120-
f"helloworld-{suffix}",
121+
f"helloworld-fn-{suffix}",
121122
"--project",
122123
project,
123124
"--region=us-central1",

0 commit comments

Comments
 (0)