| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,3 +5,7 @@ env_vars: { | |||
| 5 | 5 | key: "RUN_SYSTEM_TESTS" | |
| 6 | 6 | value: "false" | |
| 7 | 7 | } | |
| 8 | + env_vars: { | ||
| 9 | + key: "RUN_SNIPPETS_TESTS" | ||
| 10 | + value: "false" | ||
| 11 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + # Format: //devtools/kokoro/config/proto/build.proto | ||
| 2 | + | ||
| 3 | + # Only run this nox session. | ||
| 4 | + env_vars: { | ||
| 5 | + key: "NOX_SESSION" | ||
| 6 | + value: "snippets-2.7" | ||
| 7 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + # Format: //devtools/kokoro/config/proto/build.proto | ||
| 2 | + | ||
| 3 | + # Only run this nox session. | ||
| 4 | + env_vars: { | ||
| 5 | + key: "NOX_SESSION" | ||
| 6 | + value: "snippets-3.8" | ||
| 7 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -112,14 +112,18 @@ def system(session): | |||
| 112 | 112 | def snippets(session): | |
| 113 | 113 | """Run the snippets test suite.""" | |
| 114 | 114 | ||
| 115 | - constraints_path = str( | ||
| 116 | - CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
| 117 | - ) | ||
| 115 | + # Check the value of `RUN_SNIPPETS_TESTS` env var. It defaults to true. | ||
| 116 | + if os.environ.get("RUN_SNIPPETS_TESTS", "true") == "false": | ||
| 117 | + session.skip("RUN_SNIPPETS_TESTS is set to false, skipping") | ||
| 118 | 118 | ||
| 119 | 119 | # Sanity check: Only run snippets tests if the environment variable is set. | |
| 120 | 120 | if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): | |
| 121 | 121 | session.skip("Credentials must be set via environment variable.") | |
| 122 | 122 | ||
| 123 | + constraints_path = str( | ||
| 124 | + CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt" | ||
| 125 | + ) | ||
| 126 | + | ||
| 123 | 127 | # Install all test dependencies, then install local packages in place. | |
| 124 | 128 | session.install("mock", "pytest", "google-cloud-testutils", "-c", constraints_path) | |
| 125 | 129 | session.install("google-cloud-storage", "-c", constraints_path) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments