Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ tasks.register<Copy>("copySubProjectsOpenAPIFiles") {
into("${layout.buildDirectory.get()}/tmp/openapi")
} else {
logger.warn(
"Unable to find OpenAPI definitions in project dependencies => 'copySubProjectsOpenAPIFiles' not configured!")
"Unable to find OpenAPI definitions in project dependencies => 'copySubProjectsOpenAPIFiles' not configured!"
)
}
}

Expand Down Expand Up @@ -114,7 +115,8 @@ tasks.register<GenerateTask>("openApiTypescriptGenerate") {
additionalProperties.set(
mapOf(
"npmName" to "@cosmotech/api-ts",
))
)
)
}

tasks.register<Copy>("copyTypescriptGitPushScript") {
Expand Down Expand Up @@ -155,7 +157,9 @@ tasks.register<GenerateTask>("openApiPythonGenerate") {
mapOf(
"projectName" to "cosmotech-api",
"packageName" to "cosmotech_api",
"pythonAttrNoneIfUnset" to true))
"pythonAttrNoneIfUnset" to true,
)
)
}

// PROD-14252: temporary fix waiting for upstream resolution of
Expand Down Expand Up @@ -233,7 +237,8 @@ tasks.register("generateClients") {
"generateTypescriptClient",
"generatePythonClient",
"openApiUmlGenerate",
"openApiMarkdownGenerate")
"openApiMarkdownGenerate",
)
}

tasks.getByName<BootJar>("bootJar") { finalizedBy("generateClients") }
Expand All @@ -260,5 +265,7 @@ tasks.register<GenerateTask>("generateDocumentation") {
"disallowAdditionalPropertiesIfNotPresent" to false,
"infoEmail" to "[email protected]",
"snippetDir" to "${rootDir}/doc/generated-snippets/",
"infoUrl" to "https://github.com/Cosmo-Tech/cosmotech-api"))
"infoUrl" to "https://github.com/Cosmo-Tech/cosmotech-api",
)
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ abstract class ControllerTestBase : AbstractTestcontainersRedisTestBase() {

${response.contentAsString}
"""
.trimIndent())
.trimIndent()
)
}
}
.apply<DefaultMockMvcBuilder>(springSecurity())
Expand All @@ -91,26 +92,31 @@ abstract class ControllerTestBase : AbstractTestcontainersRedisTestBase() {
modifyHeaders().remove(HttpHeaders.CONTENT_LENGTH),
modifyHeaders().remove(PLATFORM_ADMIN_EMAIL),
modifyHeaders().remove(ORGANIZATION_USER_EMAIL),
prettyPrint())
prettyPrint(),
)
.withResponseDefaults(
modifyHeaders()
.remove("X-Content-Type-Options")
.remove("X-XSS-Protection")
.remove("X-Frame-Options")
.remove(HttpHeaders.CONTENT_LENGTH)
.remove(HttpHeaders.CACHE_CONTROL),
prettyPrint()))
prettyPrint(),
)
)
.build()
}

companion object {
private const val DEFAULT_REDIS_PORT = 6379
private const val LOCALSTACK_FULL_IMAGE_NAME = "localstack/localstack:3.5.0"
private const val LOCALSTACK_FULL_IMAGE_NAME = "localstack/localstack:latest"

var postgres: PostgreSQLContainer<*> =
PostgreSQLContainer("postgres:alpine3.19")
PostgreSQLContainer("postgres:latest")
.withCopyFileToContainer(
MountableFile.forClasspathResource("init-db.sql"), "/docker-entrypoint-initdb.d/")
MountableFile.forClasspathResource("init-db.sql"),
"/docker-entrypoint-initdb.d/",
)

var redisStackServer = RedisStackContainer(RedisStackContainer.DEFAULT_IMAGE_NAME)

Expand Down
Loading
Loading