mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 08:11:21 +00:00
tests: test CR SCW cuts
This commit is contained in:
@@ -2,6 +2,7 @@ extern crate scaleway_api_rs;
|
||||
|
||||
use crate::cloud_provider::scaleway::application::ScwZone;
|
||||
|
||||
use self::scaleway_api_rs::models::scaleway_registry_v1_namespace::Status;
|
||||
use crate::build_platform::Image;
|
||||
use crate::container_registry::docker::{docker_login, docker_manifest_inspect, docker_tag_and_push_image};
|
||||
use crate::container_registry::{ContainerRegistry, Kind, PushResult};
|
||||
@@ -90,9 +91,13 @@ impl ScalewayCR {
|
||||
};
|
||||
|
||||
// We consider every registry namespace names are unique
|
||||
if let Some(registry) = scaleway_registry_namespaces {
|
||||
if !registry.is_empty() {
|
||||
return Some(registry.into_iter().next().unwrap());
|
||||
if let Some(registries) = scaleway_registry_namespaces {
|
||||
if let Some(registry) = registries
|
||||
.into_iter()
|
||||
.filter(|r| r.status == Some(Status::Ready))
|
||||
.next()
|
||||
{
|
||||
return Some(registry);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1226,14 +1226,7 @@ pub fn get_environment_test_kubernetes<'a>(
|
||||
uuid::Uuid::new_v4(),
|
||||
format!("qovery-{}", context.cluster_id()),
|
||||
SCW_KUBERNETES_VERSION.to_string(),
|
||||
ScwZone::from_str(
|
||||
secrets
|
||||
.clone()
|
||||
.SCALEWAY_DEFAULT_REGION
|
||||
.expect("SCALEWAY_DEFAULT_REGION is not set")
|
||||
.as_str(),
|
||||
)
|
||||
.unwrap(),
|
||||
ScwZone::Warsaw1,
|
||||
cloud_provider,
|
||||
dns_provider,
|
||||
Scaleway::kubernetes_nodes(),
|
||||
|
||||
@@ -19,7 +19,7 @@ use qovery_engine::cloud_provider::qovery::EngineLocation;
|
||||
use qovery_engine::logger::Logger;
|
||||
use tracing::error;
|
||||
|
||||
pub const SCW_TEST_ZONE: ScwZone = ScwZone::Paris2;
|
||||
pub const SCW_TEST_ZONE: ScwZone = ScwZone::Warsaw1;
|
||||
pub const SCW_KUBERNETES_MAJOR_VERSION: u8 = 1;
|
||||
pub const SCW_KUBERNETES_MINOR_VERSION: u8 = 19;
|
||||
pub const SCW_KUBERNETES_VERSION: &'static str =
|
||||
|
||||
@@ -343,7 +343,7 @@ impl FuncTestsSecrets {
|
||||
"SCALEWAY_TEST_ORGANIZATION_ID",
|
||||
secrets.SCALEWAY_TEST_ORGANIZATION_ID,
|
||||
),
|
||||
SCALEWAY_TEST_CLUSTER_ID: Self::select_secret("SCALEWAY_TEST_CLUSTER_ID", secrets.SCALEWAY_TEST_CLUSTER_ID),
|
||||
SCALEWAY_TEST_CLUSTER_ID: Some("zd8eb3905".to_string()), //Self::select_secret("SCALEWAY_TEST_CLUSTER_ID", secrets.SCALEWAY_TEST_CLUSTER_ID),
|
||||
TERRAFORM_AWS_ACCESS_KEY_ID: Self::select_secret(
|
||||
"TERRAFORM_AWS_ACCESS_KEY_ID",
|
||||
secrets.TERRAFORM_AWS_ACCESS_KEY_ID,
|
||||
|
||||
@@ -31,10 +31,10 @@ fn create_scaleway_kubernetes_kapsule_test_cluster() {
|
||||
.SCALEWAY_TEST_ORGANIZATION_ID
|
||||
.as_ref()
|
||||
.expect("SCALEWAY_TEST_ORGANIZATION_ID");
|
||||
let cluster_id = secrets
|
||||
.SCALEWAY_TEST_CLUSTER_ID
|
||||
.as_ref()
|
||||
.expect("SCALEWAY_TEST_CLUSTER_ID");
|
||||
let cluster_id = "zd8eb3905".to_string(); /*secrets
|
||||
.SCALEWAY_TEST_CLUSTER_ID
|
||||
.as_ref()
|
||||
.expect("SCALEWAY_TEST_CLUSTER_ID");*/
|
||||
|
||||
let logger = logger();
|
||||
let context = context(organization_id.as_str(), cluster_id.as_str());
|
||||
|
||||
Reference in New Issue
Block a user