refactor(tests): Simplify ChaosTest initialization and remove obsolete integration test
This commit is contained in:
parent
d08ebfc094
commit
bbb1657e42
5 changed files with 4 additions and 5 deletions
|
@ -3,7 +3,7 @@ pub struct ChaosTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ChaosTest {
|
impl ChaosTest {
|
||||||
pub async fn new(namespace: String) -> anyhow::Result<Self> {
|
pub async fn new() -> anyhow::Result<Self> {
|
||||||
// Initialize the ChaosTest struct
|
// Initialize the ChaosTest struct
|
||||||
Ok(ChaosTest { })
|
Ok(ChaosTest { })
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
use goose::prelude::*;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
#[derive(Debug, Serialize, Deserialize)]
|
#[derive(Debug, Serialize, Deserialize)]
|
||||||
|
|
|
@ -2,7 +2,7 @@ use gb_testing::chaos::ChaosTest;
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_kubernetes_chaos() -> anyhow::Result<()> {
|
async fn test_kubernetes_chaos() -> anyhow::Result<()> {
|
||||||
let chaos_test = ChaosTest::new("general-bots".to_string()).await?;
|
let chaos_test = ChaosTest::new().await?;
|
||||||
|
|
||||||
|
|
||||||
chaos_test.network_partition().await?;
|
chaos_test.network_partition().await?;
|
||||||
|
|
|
@ -3,7 +3,7 @@ use anyhow::Result;
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use gb_core::models::AppState;
|
use gb_core::models::AppState;
|
||||||
use gb_file::handlers::upload_file;
|
use gb_file::handlers::upload_file;
|
||||||
use minio::s3::args::{BucketExistsArgs, GetObjectArgs, MakeBucketArgs, StatObjectArgs};
|
use minio::s3::args::{BucketExistsArgs, MakeBucketArgs, StatObjectArgs};
|
||||||
use minio::s3::client::ClientBuilder as MinioClientBuilder;
|
use minio::s3::client::ClientBuilder as MinioClientBuilder;
|
||||||
use minio::s3::creds::StaticProvider;
|
use minio::s3::creds::StaticProvider;
|
||||||
use minio::s3::http::BaseUrl;
|
use minio::s3::http::BaseUrl;
|
||||||
|
@ -55,7 +55,7 @@ async fn test_successful_file_upload() -> Result<()> {
|
||||||
|
|
||||||
// Prepare a multipart request
|
// Prepare a multipart request
|
||||||
let boundary = "----WebKitFormBoundaryX";
|
let boundary = "----WebKitFormBoundaryX";
|
||||||
let content_type = format!("multipart/form-data; boundary={}", boundary);
|
|
||||||
|
|
||||||
// Read the file content
|
// Read the file content
|
||||||
let mut file_content = Vec::new();
|
let mut file_content = Vec::new();
|
Loading…
Add table
Reference in a new issue