Skip to content

Commit b525ea9

Browse files
upgrade integration test suite (host part) (#430)
Co-authored-by: sergiyv-bitquill <[email protected]>
1 parent 3d59482 commit b525ea9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2162
-1648
lines changed

.github/workflows/integration_tests.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ jobs:
6161
./gradlew --no-parallel --no-daemon test-python-${{ matrix.python-version }} --info
6262
env:
6363
RDS_CLUSTER_DOMAIN: ${{ secrets.DB_CONN_SUFFIX }}
64-
AURORA_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
65-
MULTI_AZ_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
64+
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
6665
AWS_ACCESS_KEY_ID: ${{ env.TEMP_AWS_ACCESS_KEY_ID }}
6766
AWS_SECRET_ACCESS_KEY: ${{ env.TEMP_AWS_SECRET_ACCESS_KEY }}
6867
AWS_SESSION_TOKEN: ${{ env.TEMP_AWS_SESSION_TOKEN }}

aws_advanced_python_wrapper/resources/aws_advanced_python_wrapper_messages.properties

+2
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ Testing.InstanceNotFound=[Testing] Instance {} not found.
266266
Testing.OpenConnectionFailed=[Testing] Open connection failed with exception: {}.
267267
Testing.ProxyNotFound=[Testing] Proxy for {} is not found.
268268
Testing.RequiredTestDriver=[Testing] testDriver is required.
269+
Testing._get_multi_az_instance_ids=[Testing] Get topology: {}.
270+
Testing._get_multi_az_instance_ids_connecting=[Testing] Connecting to {}.
269271

270272
UnknownDialect.AbortConnection=[UnknownDialect] abort_connection was called, but the database dialect is unknown. A valid database dialect must be detected in order to abort a connection.
271273

docs/development-guide/IntegrationTests.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -117,17 +117,17 @@ unset FILTER # Done testing the IAM tests, unset FILTER
117117

118118
| Environment Variable Name | Required | Description | Example Value |
119119
|---------------------------|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|
120-
| `DB_USER` | Yes | The username to access the database. | `admin` |
120+
| `DB_USER` | Yes | The username to access the database. | `admin` |
121121
| `DB_PASSWORD` | Yes | The database cluster password. | `password` |
122122
| `DB_DATABASE_NAME` | No | Name of the database that will be used by the tests. The default database name is test. | `test_db_name` |
123-
| `AURORA_CLUSTER_NAME` | Yes | The database identifier for your Aurora cluster. Must be a unique value to avoid conflicting with existing clusters. | `db-identifier` |
124-
| `RDS_CLUSTER_DOMAIN` | No | The existing database connection suffix. Use this variable to run against an existing database. | `XYZ.us-east-2.rds.amazonaws.com` |
123+
| `RDS_CLUSTER_NAME` | Yes | The database identifier for your Aurora or RDS cluster. Must be a unique value to avoid conflicting with existing clusters. | `db-identifier` |
124+
| `RDS_CLUSTER_DOMAIN` | No | The existing database connection suffix. Use this variable to run against an existing database. | `XYZ.us-east-2.rds.amazonaws.com` |
125125
| `IAM_USER` | No | User within the database that is identified with AWSAuthenticationPlugin. This is used for AWS IAM Authentication and is optional | `example_user_name` |
126126
| `AWS_ACCESS_KEY_ID` | Yes | An AWS access key associated with an IAM user or role with RDS permissions. | `ASIAIOSFODNN7EXAMPLE` |
127127
| `AWS_SECRET_ACCESS_KEY` | Yes | The secret key associated with the provided AWS_ACCESS_KEY_ID. | `wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY` |
128128
| `AWS_SESSION_TOKEN` | No | AWS Session Token for CLI, SDK, & API access. This value is for MFA credentials only. See: [temporary AWS credentials](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html). | `AQoDYXdzEJr...<remainder of session token>` | |
129-
| `REUSE_AURORA_CLUSTER` | Yes | Set to true if you would like to use an existing cluster for your tests. | `false` |
130-
| `AURORA_DB_REGION` | Yes | The database region. | `us-east-2` |
129+
| `REUSE_RDS_CLUSTER` | Yes | Set to true if you would like to use an existing cluster for your tests. | `false` |
130+
| `RDS_DB_REGION` | Yes | The database region. | `us-east-2` |
131131
| `DEBUG_ENV` | No | The IDE you will be using to debug the tests, values are either `PYCHARM` or `VSCODE` | `PYCHARM` |
132132

133133
## Managing Environment Variables

docs/examples/PGXRayTelemetry.py

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import logging
1818

1919
import psycopg
20+
from aws_xray_sdk import global_sdk_config
2021
from aws_xray_sdk.core import xray_recorder
2122
from aws_xray_sdk.core.sampling.local.sampler import LocalSampler
2223

@@ -29,6 +30,7 @@
2930
logging.basicConfig(level=logging.DEBUG)
3031

3132
xray_recorder.configure(sampler=LocalSampler({"version": 1, "default": {"fixed_target": 1, "rate": 1.0}}))
33+
global_sdk_config.set_sdk_enabled(True)
3234

3335
with xray_recorder.in_segment("python_xray_telemetry_app") as segment:
3436
with AwsWrapperConnection.connect(

0 commit comments

Comments
 (0)