diff --git a/test/e2e/README.md b/test/e2e/README.md index 3edf57d2d1..83292bbc22 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -71,5 +71,5 @@ environment variables or a `.env` file at the project directory. CORTEX_TEST_REALTIME_DEPLOY_TIMEOUT=60 CORTEX_TEST_BATCH_DEPLOY_TIMEOUT=30 CORTEX_TEST_BATCH_JOB_TIMEOUT=120 -CORTEX_TEST_BATCH_S3_BUCKET_DIR=s3:///test/jobs +CORTEX_TEST_BATCH_S3_PATH=s3:///test/jobs ``` diff --git a/test/e2e/e2e/tests.py b/test/e2e/e2e/tests.py index cac1c44bce..e193098325 100644 --- a/test/e2e/e2e/tests.py +++ b/test/e2e/e2e/tests.py @@ -75,7 +75,7 @@ def test_realtime_api(client: cx.Client, api: str, timeout: int = None): def test_batch_api( client: cx.Client, api: str, - test_bucket: str, + test_s3_path: str, deploy_timeout: int = None, job_timeout: int = None, retry_attempts: int = 0, @@ -103,7 +103,7 @@ def test_batch_api( api_name, item_list=payload, batch_size=2, - config={"dest_s3_dir": test_bucket}, + config={"dest_s3_dir": test_s3_path}, ) if response.status_code == HTTPStatus.OK: break diff --git a/test/e2e/tests/aws/test_batch.py b/test/e2e/tests/aws/test_batch.py index 8599f7cf3c..8d7902d04f 100644 --- a/test/e2e/tests/aws/test_batch.py +++ b/test/e2e/tests/aws/test_batch.py @@ -25,17 +25,17 @@ @pytest.mark.usefixtures("client") @pytest.mark.parametrize("api", TEST_APIS) def test_batch_api(config: Dict, client: cx.Client, api: str): - s3_bucket = config["aws"].get("s3_bucket") - if not s3_bucket: + s3_path = config["aws"].get("s3_path") + if not s3_path: pytest.skip( - "--s3-bucket option is required to run batch tests (alternatively set the " - "CORTEX_TEST_BATCH_S3_BUCKET_DIR env var) )" + "--s3-path option is required to run batch tests (alternatively set the " + "CORTEX_TEST_BATCH_S3_PATH env var) )" ) e2e.tests.test_batch_api( client, api, - test_bucket=s3_bucket, + test_s3_path=s3_path, deploy_timeout=config["global"]["batch_deploy_timeout"], job_timeout=config["global"]["batch_job_timeout"], retry_attempts=5, diff --git a/test/e2e/tests/conftest.py b/test/e2e/tests/conftest.py index b8515c93ea..b76053317a 100644 --- a/test/e2e/tests/conftest.py +++ b/test/e2e/tests/conftest.py @@ -44,24 +44,24 @@ def pytest_addoption(parser): help="set cortex GCP cluster config, to test on a new GCP cluster", ) parser.addoption( - "--s3-bucket", + "--s3-path", action="store", default=None, - help="set s3 bucket where batch jobs results will be stored", + help="set s3 path where batch jobs results will be stored", ) def pytest_configure(config): load_dotenv(".env") - s3_bucket = os.environ.get("CORTEX_TEST_BATCH_S3_BUCKET_DIR") - s3_bucket = config.getoption("--s3-bucket") if not s3_bucket else s3_bucket + s3_path = os.environ.get("CORTEX_TEST_BATCH_S3_PATH") + s3_path = config.getoption("--s3-path") if not s3_path else s3_path configuration = { "aws": { "env": config.getoption("--aws-env"), "config": config.getoption("--aws-config"), - "s3_bucket": s3_bucket, + "s3_path": s3_path, }, "gcp": { "env": config.getoption("--gcp-env"),