feat: add support for experimental host by sagnghos · Pull Request #1452 · googleapis/python-spanner

@sagnghos

@sagnghos

@rahul2393

@sagnghos

surbhigarg92

@sagnghos

surbhigarg92

rahul2393

@rahul2393

rahul2393 pushed a commit that referenced this pull request

Feb 26, 2026
Previously #1452
introduced changes to support python spanner client against spanner
experimental host endpoints over insecure communication

This PR extends those changes to support python spanner client
connections to experimental host endpoints over TLS / mTLS connections
as well. It also includes changes to run Integration Tests against
experimental hosts across all 3 modes of network communication
(plain-text, TLS, mTLS)

To run IT tests against experimental host set below variables
```
export SPANNER_EXPERIMENTAL_HOST=localhost:15000
```
For tls/mTLS set below additonal variables:
- (mTLS/TLS)
```
export CA_CERTIFICATE=/tmp/experimental_host/ca-certificates/ca.crt
```
- (mTLS)
```
export CLIENT_CERTIFICATE=/tmp/experimental_host/certs/client.crt
export CLIENT_KEY=/tmp/experimental_host/certs/client.key
```

Then we can run below command to tigger the tests:
```
python -m pytest -v -s --disable-warnings  tests/system/
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>

parthea pushed a commit to googleapis/google-cloud-python that referenced this pull request

Mar 9, 2026
Previously googleapis/python-spanner#1452
introduced changes to support python spanner client against spanner
experimental host endpoints over insecure communication

This PR extends those changes to support python spanner client
connections to experimental host endpoints over TLS / mTLS connections
as well. It also includes changes to run Integration Tests against
experimental hosts across all 3 modes of network communication
(plain-text, TLS, mTLS)

To run IT tests against experimental host set below variables
```
export SPANNER_EXPERIMENTAL_HOST=localhost:15000
```
For tls/mTLS set below additonal variables:
- (mTLS/TLS)
```
export CA_CERTIFICATE=/tmp/experimental_host/ca-certificates/ca.crt
```
- (mTLS)
```
export CLIENT_CERTIFICATE=/tmp/experimental_host/certs/client.crt
export CLIENT_KEY=/tmp/experimental_host/certs/client.key
```

Then we can run below command to tigger the tests:
```
python -m pytest -v -s --disable-warnings  tests/system/
```

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>