Skip to content

Commit 705b188

Browse files
committed
fix: update goldens for gapic-generator integration tests
1 parent 9472ab6 commit 705b188

8 files changed

Lines changed: 184 additions & 0 deletions

File tree

packages/gapic-generator/tests/integration/goldens/asset/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.asset",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/credentials/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.iam.credentials",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/eventarc/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.eventarc_v1",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/logging/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.logging",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/logging_internal/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.logging",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/redis/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.redis",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/redis_selective/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.redis",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

packages/gapic-generator/tests/integration/goldens/storagebatchoperations/noxfile.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@
9393
"lint_setup_py",
9494
"blacken",
9595
"docs",
96+
"import_profile",
9697
]
9798

9899
# Error if a python version is missing
@@ -633,3 +634,25 @@ def core_deps_from_source(session, protobuf_implementation):
633634
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
634635
},
635636
)
637+
638+
639+
@nox.session(python="3.15")
640+
def import_profile(session):
641+
"""Ensure import times remain below defined thresholds."""
642+
profiler_script = (
643+
CURRENT_DIRECTORY.parent.parent / "scripts" / "import_profiler" / "profiler.py"
644+
)
645+
if not profiler_script.exists():
646+
session.skip("The import profiler script was not found.")
647+
648+
session.install(".")
649+
session.run(
650+
"python",
651+
str(profiler_script),
652+
"--package",
653+
"google.cloud.storagebatchoperations",
654+
"--fail-threshold",
655+
"5000",
656+
"--iterations",
657+
"10",
658+
)

0 commit comments

Comments
 (0)