test(compat): run the China-absent tests per partition instead of allowlisting them (#5027)

* test(compat): run the China-absent tests per partition instead of allowlisting them

Third batch of the cn-north-1 allowlist burn-down (#4272): the 13 tests that
exercised something AWS does not offer in China. Seven keep running there
with the China shape:

- S3Test: only the us-east-1 endpoint creates a bucket in another region, so
  elsewhere the location-constraint round trip names the client's own region.
- StsTest: the SAML assertion's Recipient is the partition's console sign-on
  URL (the CDK region facts), signin.amazonaws.cn in China.
- Ec2Tests: China names its interface endpoint services cn.com.amazonaws, so
  the S3 gateway and interface offerings are two services there.
- IamTest: GetAccountSummary reports GlobalEndpointTokenVersion only in the
  commercial partition, the one with a global STS endpoint.

Six skip where the service has no endpoint: the five Marketplace tests (the
regions botocore publishes for each) and Lightsail (commercial only).

The allowlist's China-absent section is gone, 13 entries, 73 to 60.

* test(compat): derive VPC endpoint names from the DNS suffix and keep Marketplace guards to us-east-1

The ECR interface service is named under the partition's DNS suffix reversed
in every China, EUSC and ISO region (eu.amazonaws, gov.ic.c2s, ...), not only
in China, so describeVpcEndpointServices now takes that prefix from the SDK's
partition metadata. S3 keeps the China-only split, the only regions where
AWS lists it.

Floci serves Marketplace Agreement and Entitlement only in us-east-1, so
their guards no longer admit the other regions AWS runs them in; widening
both is a separate change.
This commit is contained in:
Hector Ventura authored and GitHub committed 2026-10-03 17:53:57 -04:00
1 parent d5fd4d52f1
commit 6deb0d4d2b
11 files changed
+110 -43

No files matched your search

@@ -51,21 +51,3 @@ S3VectorsTest#createVectorBucket
SecretsManagerTest#rotateSecretStub
SesEventPublishingTest#
SsoOidcTest#createTokenWithIamUsesAwsSdk
# The test exercises something that does not exist in China, and Floci answers as AWS
# does there (Marketplace and Lightsail are commercial-only, an eu-central-1 bucket cannot be
# created through a China endpoint, no global STS token version, China interface endpoint
# names, the China SAML sign-on URL). These need a commercial-only guard in the test.
Ec2Tests#describeVpcEndpointServices
IamTest#getAccountSummary
LightsailTest#sdkCanCreateAndManageCoreLightsailResources
MarketplaceAgreementTest#usesAwsSdkWireContract
MarketplaceCatalogTest#usesAwsSdkWireContract
MarketplaceDeploymentTest#usesAwsSdkWireContract
MarketplaceDiscoveryTest#usesAwsSdkWireContract
MarketplaceEntitlementTest#usesAwsSdkWireContract
S3Test#createBucketWithLocationConstraint
S3Test#deleteEuBucket
S3Test#getBucketLocationEuCentral1
StsTest#assumeRoleWithSaml
StsTest#assumeRoleWithSamlAssumedRoleUser