Skip to content
This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Commit deb15ef

Browse files
authored
revert
1 parent 90d8192 commit deb15ef

File tree

1 file changed

+0
-140
lines changed

1 file changed

+0
-140
lines changed

noxfile.py

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434

3535
DEFAULT_PYTHON_VERSION = "3.8"
3636

37-
DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12"
38-
DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12"
3937
DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION = "3.12"
4038
UNIT_TEST_PYTHON_VERSIONS: List[str] = [
4139
"3.7",
@@ -195,54 +193,6 @@ def install_unittest_dependencies(session, *constraints):
195193
*session.posargs,
196194
)
197195

198-
# XXX Work around Kokoro image's older pip, which borks the OT install.
199-
session.run("pip", "install", "--upgrade", "pip")
200-
constraints_path = str(
201-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
202-
)
203-
session.install("-e", ".[tracing]", "-c", constraints_path)
204-
# XXX: Dump installed versions to debug OT issue
205-
session.run("pip", "list")
206-
207-
# Run py.test against the unit tests with OpenTelemetry.
208-
session.run(
209-
"py.test",
210-
"--quiet",
211-
"--cov=google.cloud.spanner",
212-
"--cov=google.cloud",
213-
"--cov=tests.unit",
214-
"--cov-append",
215-
"--cov-config=.coveragerc",
216-
"--cov-report=",
217-
"--cov-fail-under=0",
218-
os.path.join("tests", "unit"),
219-
*session.posargs,
220-
)
221-
222-
# XXX Work around Kokoro image's older pip, which borks the OT install.
223-
session.run("pip", "install", "--upgrade", "pip")
224-
constraints_path = str(
225-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
226-
)
227-
session.install("-e", ".[tracing]", "-c", constraints_path)
228-
# XXX: Dump installed versions to debug OT issue
229-
session.run("pip", "list")
230-
231-
# Run py.test against the unit tests with OpenTelemetry.
232-
session.run(
233-
"py.test",
234-
"--quiet",
235-
"--cov=google.cloud.spanner",
236-
"--cov=google.cloud",
237-
"--cov=tests.unit",
238-
"--cov-append",
239-
"--cov-config=.coveragerc",
240-
"--cov-report=",
241-
"--cov-fail-under=0",
242-
os.path.join("tests", "unit"),
243-
*session.posargs,
244-
)
245-
246196

247197
@nox.session(python=UNIT_TEST_PYTHON_VERSIONS)
248198
@nox.parametrize(
@@ -313,62 +263,6 @@ def mockserver(session):
313263
)
314264

315265

316-
@nox.session(python=DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION)
317-
def mockserver(session):
318-
# Install all test dependencies, then install this package in-place.
319-
320-
constraints_path = str(
321-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
322-
)
323-
# install_unittest_dependencies(session, "-c", constraints_path)
324-
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
325-
session.install(*standard_deps, "-c", constraints_path)
326-
session.install("-e", ".", "-c", constraints_path)
327-
328-
# Run py.test against the mockserver tests.
329-
session.run(
330-
"py.test",
331-
"--quiet",
332-
f"--junitxml=unit_{session.python}_sponge_log.xml",
333-
"--cov=google",
334-
"--cov=tests/unit",
335-
"--cov-append",
336-
"--cov-config=.coveragerc",
337-
"--cov-report=",
338-
"--cov-fail-under=0",
339-
os.path.join("tests", "mockserver_tests"),
340-
*session.posargs,
341-
)
342-
343-
344-
@nox.session(python=DEFAULT_MOCK_SERVER_TESTS_PYTHON_VERSION)
345-
def mockserver(session):
346-
# Install all test dependencies, then install this package in-place.
347-
348-
constraints_path = str(
349-
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
350-
)
351-
# install_unittest_dependencies(session, "-c", constraints_path)
352-
standard_deps = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_DEPENDENCIES
353-
session.install(*standard_deps, "-c", constraints_path)
354-
session.install("-e", ".", "-c", constraints_path)
355-
356-
# Run py.test against the mockserver tests.
357-
session.run(
358-
"py.test",
359-
"--quiet",
360-
f"--junitxml=unit_{session.python}_sponge_log.xml",
361-
"--cov=google",
362-
"--cov=tests/unit",
363-
"--cov-append",
364-
"--cov-config=.coveragerc",
365-
"--cov-report=",
366-
"--cov-fail-under=0",
367-
os.path.join("tests", "mockserver_tests"),
368-
*session.posargs,
369-
)
370-
371-
372266
def install_systemtest_dependencies(session, *constraints):
373267
# Use pre-release gRPC for system tests.
374268
# Exclude version 1.52.0rc1 which has a known issue.
@@ -433,28 +327,6 @@ def system(session, protobuf_implementation, database_dialect):
433327
if os.environ.get("SPANNER_EMULATOR_HOST") and database_dialect == "POSTGRESQL":
434328
session.skip("Postgresql is not supported by Emulator yet.")
435329

436-
# Sanity check: Only run tests if the environment variable is set.
437-
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", "") and not os.environ.get(
438-
"SPANNER_EMULATOR_HOST", ""
439-
):
440-
session.skip(
441-
"Credentials or emulator host must be set via environment variable"
442-
)
443-
# If POSTGRESQL tests and Emulator, skip the tests
444-
if os.environ.get("SPANNER_EMULATOR_HOST") and database_dialect == "POSTGRESQL":
445-
session.skip("Postgresql is not supported by Emulator yet.")
446-
447-
# Sanity check: Only run tests if the environment variable is set.
448-
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", "") and not os.environ.get(
449-
"SPANNER_EMULATOR_HOST", ""
450-
):
451-
session.skip(
452-
"Credentials or emulator host must be set via environment variable"
453-
)
454-
# If POSTGRESQL tests and Emulator, skip the tests
455-
if os.environ.get("SPANNER_EMULATOR_HOST") and database_dialect == "POSTGRESQL":
456-
session.skip("Postgresql is not supported by Emulator yet.")
457-
458330
# Install pyopenssl for mTLS testing.
459331
if os.environ.get("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true":
460332
session.install("pyopenssl")
@@ -467,18 +339,6 @@ def system(session, protobuf_implementation, database_dialect):
467339

468340
install_systemtest_dependencies(session, "-c", constraints_path)
469341

470-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
471-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
472-
# The 'cpp' implementation requires Protobuf<4.
473-
if protobuf_implementation == "cpp":
474-
session.install("protobuf<4")
475-
476-
# TODO(https://github.com/googleapis/synthtool/issues/1976):
477-
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
478-
# The 'cpp' implementation requires Protobuf<4.
479-
if protobuf_implementation == "cpp":
480-
session.install("protobuf<4")
481-
482342
# TODO(https://github.com/googleapis/synthtool/issues/1976):
483343
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
484344
# The 'cpp' implementation requires Protobuf<4.

0 commit comments

Comments
 (0)