mirror of
https://github.com/jlengrand/engine.git
synced 2026-03-10 15:49:32 +00:00
Fix sticky sessions tests
This commit is contained in:
@@ -10,6 +10,8 @@ use qovery_engine::cmd::kubectl::kubernetes_get_all_pdbs;
|
||||
use qovery_engine::models::{Action, CloneForTest, EnvironmentAction, Port, Protocol, Storage, StorageType};
|
||||
use qovery_engine::transaction::TransactionResult;
|
||||
use std::collections::BTreeMap;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use test_utilities::aws::aws_default_engine_config;
|
||||
use test_utilities::utilities::{context, init, kubernetes_config_path};
|
||||
use tracing::{span, Level};
|
||||
@@ -948,6 +950,8 @@ fn aws_eks_deploy_a_working_environment_with_sticky_session() {
|
||||
let ret = environment.deploy_environment(&env_action, logger.clone(), &engine_config);
|
||||
assert!(matches!(ret, TransactionResult::Ok));
|
||||
|
||||
// let time for nginx to reload the config
|
||||
thread::sleep(Duration::from_secs(5));
|
||||
// checking if cookie is properly set on the app
|
||||
assert!(routers_sessions_are_sticky(environment.routers.clone()));
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ use qovery_engine::cloud_provider::Kind;
|
||||
use qovery_engine::models::{Action, CloneForTest, EnvironmentAction, Port, Protocol, Storage, StorageType};
|
||||
use qovery_engine::transaction::TransactionResult;
|
||||
use std::collections::BTreeMap;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use test_utilities::common::Infrastructure;
|
||||
use test_utilities::digitalocean::do_default_engine_config;
|
||||
use test_utilities::utilities::context;
|
||||
@@ -833,6 +835,8 @@ fn digitalocean_doks_deploy_a_working_environment_with_sticky_session() {
|
||||
let result = environment.deploy_environment(&env_action, logger.clone(), &engine_config);
|
||||
assert!(matches!(result, TransactionResult::Ok));
|
||||
|
||||
// let time for nginx to reload the config
|
||||
thread::sleep(Duration::from_secs(5));
|
||||
// checking cookie is properly set on the app
|
||||
assert!(routers_sessions_are_sticky(environment.routers.clone()));
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ use qovery_engine::cloud_provider::Kind;
|
||||
use qovery_engine::models::{Action, CloneForTest, EnvironmentAction, Port, Protocol, Storage, StorageType};
|
||||
use qovery_engine::transaction::TransactionResult;
|
||||
use std::collections::BTreeMap;
|
||||
use std::thread;
|
||||
use std::time::Duration;
|
||||
use test_utilities::common::Infrastructure;
|
||||
use test_utilities::scaleway::scw_default_engine_config;
|
||||
use tracing::{span, warn, Level};
|
||||
@@ -953,6 +955,8 @@ fn scaleway_kapsule_deploy_a_working_environment_with_sticky_session() {
|
||||
let result = environment.deploy_environment(&env_action, logger.clone(), &engine_config);
|
||||
assert!(matches!(result, TransactionResult::Ok));
|
||||
|
||||
// let time for nginx to reload the config
|
||||
thread::sleep(Duration::from_secs(5));
|
||||
// checking cookie is properly set on the app
|
||||
assert!(routers_sessions_are_sticky(environment.routers.clone()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user