Skip to content

Commit

Permalink
Fix generation of aws-config related code in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoh committed Dec 13, 2023
1 parent c704d15 commit d4db2be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ object AwsDocs {
* Also, STS and SSO must NOT reference `aws-config` since that would create a circular dependency.
*/
fun canRelyOnAwsConfig(codegenContext: ClientCodegenContext): Boolean =
SdkSettings.from(codegenContext.settings).awsConfigVersion != null &&
SdkSettings.from(codegenContext.settings).generateReadme &&
!setOf(
ShapeId.from("com.amazonaws.sso#SWBPortalService"),
ShapeId.from("com.amazonaws.ssooidc#AWSSSOOIDCService"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SdkSettings private constructor(private val awsSdk: ObjectNode?) {

/** Whether to generate a README */
val generateReadme: Boolean
get() = awsSdkBuild
get() = awsSdkBuild && !(awsSdk?.getBooleanMember("suppressReadme")?.orNull()?.value ?: false)

val requireEndpointResolver: Boolean
get() = awsSdkBuild
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fun awsIntegrationTestParams() = IntegrationTestParams(
"awsSdk",
ObjectNode.builder()
.withMember("awsSdkBuild", true)
.withMember("suppressReadme", true)
.withMember("integrationTestPath", "../sdk/integration-tests")
.withMember("partitionsConfigPath", "../sdk/aws-models/sdk-endpoints.json")
.withMember("awsConfigVersion", "1")
Expand Down

0 comments on commit d4db2be

Please sign in to comment.