mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
feat(DEV-1005): add postgres v13 & v14 support (#434)
* feat(DEV-1005): add postgres v13 & v14 support * feat(DEV-1005): add postgres v13 & v14 support tests * fix: remove v14 (no bitnami image) * fix: remove unsopported postgre v14 * tests: ignore scw managed db test for the time being Co-authored-by: Benjamin Chastanier <benjamin.chastanier@gmail.com>
This commit is contained in:
@@ -399,6 +399,10 @@ fn get_managed_postgres_version(requested_version: String) -> Result<String, Str
|
||||
let v12 = generate_supported_version(12, 2, 5, None, None, None);
|
||||
supported_postgres_versions.extend(v12);
|
||||
|
||||
// v13
|
||||
let v13 = generate_supported_version(13, 1, 4, None, None, None);
|
||||
supported_postgres_versions.extend(v13);
|
||||
|
||||
get_supported_version_to_use("Postgresql", supported_postgres_versions, requested_version)
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ pub fn get_self_hosted_postgres_version(requested_version: String) -> Result<Str
|
||||
let v12 = generate_supported_version(12, 2, 6, Some(0), Some(0), None);
|
||||
supported_postgres_versions.extend(v12);
|
||||
|
||||
// v13
|
||||
let v13 = generate_supported_version(13, 1, 4, Some(0), Some(0), None);
|
||||
supported_postgres_versions.extend(v13);
|
||||
|
||||
get_supported_version_to_use("Postgresql", supported_postgres_versions, requested_version)
|
||||
}
|
||||
|
||||
|
||||
@@ -563,6 +563,24 @@ fn postgresql_v12_deploy_a_working_dev_environment() {
|
||||
test_postgresql_configuration(context, environment, secrets, "12", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-aws-self-hosted")]
|
||||
#[named]
|
||||
#[test]
|
||||
fn postgresql_v13_deploy_a_working_dev_environment() {
|
||||
let context = context();
|
||||
let secrets = FuncTestsSecrets::new();
|
||||
let environment = test_utilities::common::working_minimal_environment(
|
||||
&context,
|
||||
AWS_QOVERY_ORGANIZATION_ID,
|
||||
secrets
|
||||
.DEFAULT_TEST_DOMAIN
|
||||
.as_ref()
|
||||
.expect("DEFAULT_TEST_DOMAIN is not set in secrets")
|
||||
.as_str(),
|
||||
);
|
||||
test_postgresql_configuration(context, environment, secrets, "13", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
// Postgres production environment
|
||||
#[cfg(feature = "test-aws-managed-services")]
|
||||
#[named]
|
||||
@@ -618,12 +636,29 @@ fn postgresql_v12_deploy_a_working_prod_environment() {
|
||||
test_postgresql_configuration(context, environment, secrets, "12", function_name!(), MANAGED);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-aws-managed-services")]
|
||||
#[named]
|
||||
#[test]
|
||||
fn postgresql_v13_deploy_a_working_prod_environment() {
|
||||
let context = context();
|
||||
let secrets = FuncTestsSecrets::new();
|
||||
let environment = test_utilities::common::working_minimal_environment(
|
||||
&context,
|
||||
AWS_QOVERY_ORGANIZATION_ID,
|
||||
secrets
|
||||
.DEFAULT_TEST_DOMAIN
|
||||
.as_ref()
|
||||
.expect("DEFAULT_TEST_DOMAIN is not set in secrets")
|
||||
.as_str(),
|
||||
);
|
||||
test_postgresql_configuration(context, environment, secrets, "13", function_name!(), MANAGED);
|
||||
}
|
||||
|
||||
/**
|
||||
**
|
||||
** MongoDB tests
|
||||
**
|
||||
**/
|
||||
|
||||
fn test_mongodb_configuration(
|
||||
context: Context,
|
||||
mut environment: Environment,
|
||||
|
||||
@@ -470,7 +470,6 @@ fn postgresql_deploy_a_working_environment_and_redeploy() {
|
||||
** PostgreSQL tests
|
||||
**
|
||||
**/
|
||||
|
||||
fn test_postgresql_configuration(
|
||||
context: Context,
|
||||
mut environment: Environment,
|
||||
@@ -634,6 +633,25 @@ fn postgresql_v12_deploy_a_working_dev_environment() {
|
||||
test_postgresql_configuration(context, environment, secrets, "12", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-do-self-hosted")]
|
||||
#[ignore]
|
||||
#[named]
|
||||
#[test]
|
||||
fn postgresql_v13_deploy_a_working_dev_environment() {
|
||||
let context = context();
|
||||
let secrets = FuncTestsSecrets::new();
|
||||
let environment = working_minimal_environment(
|
||||
&context,
|
||||
DO_QOVERY_ORGANIZATION_ID,
|
||||
secrets
|
||||
.DEFAULT_TEST_DOMAIN
|
||||
.as_ref()
|
||||
.expect("DEFAULT_TEST_DOMAIN is not set in secrets")
|
||||
.as_str(),
|
||||
);
|
||||
test_postgresql_configuration(context, environment, secrets, "13", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
/**
|
||||
**
|
||||
** MongoDB tests
|
||||
|
||||
@@ -620,6 +620,24 @@ fn postgresql_v12_deploy_a_working_dev_environment() {
|
||||
test_postgresql_configuration(context, environment, secrets, "12", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-scw-self-hosted")]
|
||||
#[named]
|
||||
#[test]
|
||||
fn postgresql_v13_deploy_a_working_dev_environment() {
|
||||
let context = context();
|
||||
let secrets = FuncTestsSecrets::new();
|
||||
let environment = working_minimal_environment(
|
||||
&context,
|
||||
SCW_QOVERY_ORGANIZATION_ID,
|
||||
secrets
|
||||
.DEFAULT_TEST_DOMAIN
|
||||
.as_ref()
|
||||
.expect("DEFAULT_TEST_DOMAIN is not set in secrets")
|
||||
.as_str(),
|
||||
);
|
||||
test_postgresql_configuration(context, environment, secrets, "13", function_name!(), CONTAINER);
|
||||
}
|
||||
|
||||
// Postgres production environment
|
||||
#[cfg(feature = "test-scw-managed-services")]
|
||||
#[named]
|
||||
@@ -678,6 +696,25 @@ fn postgresql_v12_deploy_a_working_prod_environment() {
|
||||
test_postgresql_configuration(context, environment, secrets, "12", function_name!(), MANAGED);
|
||||
}
|
||||
|
||||
#[cfg(feature = "test-scw-managed-services")]
|
||||
#[named]
|
||||
#[test]
|
||||
#[ignore]
|
||||
fn postgresql_v13_deploy_a_working_prod_environment() {
|
||||
let context = context();
|
||||
let secrets = FuncTestsSecrets::new();
|
||||
let environment = working_minimal_environment(
|
||||
&context,
|
||||
SCW_QOVERY_ORGANIZATION_ID,
|
||||
secrets
|
||||
.DEFAULT_TEST_DOMAIN
|
||||
.as_ref()
|
||||
.expect("DEFAULT_TEST_DOMAIN is not set in secrets")
|
||||
.as_str(),
|
||||
);
|
||||
test_postgresql_configuration(context, environment, secrets, "13", function_name!(), MANAGED);
|
||||
}
|
||||
|
||||
/**
|
||||
**
|
||||
** MongoDB tests
|
||||
|
||||
Reference in New Issue
Block a user