Skip to content

Commit 6160591

Browse files
authored
Rename tests script param (#1757)
1 parent d5312b2 commit 6160591

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

test/e2e/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@ environment variables or a `.env` file at the project directory.
7171
CORTEX_TEST_REALTIME_DEPLOY_TIMEOUT=60
7272
CORTEX_TEST_BATCH_DEPLOY_TIMEOUT=30
7373
CORTEX_TEST_BATCH_JOB_TIMEOUT=120
74-
CORTEX_TEST_BATCH_S3_BUCKET_DIR=s3://<s3_bucket>/test/jobs
74+
CORTEX_TEST_BATCH_S3_PATH=s3://<s3_bucket>/test/jobs
7575
```

test/e2e/e2e/tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_realtime_api(client: cx.Client, api: str, timeout: int = None):
7575
def test_batch_api(
7676
client: cx.Client,
7777
api: str,
78-
test_bucket: str,
78+
test_s3_path: str,
7979
deploy_timeout: int = None,
8080
job_timeout: int = None,
8181
retry_attempts: int = 0,
@@ -103,7 +103,7 @@ def test_batch_api(
103103
api_name,
104104
item_list=payload,
105105
batch_size=2,
106-
config={"dest_s3_dir": test_bucket},
106+
config={"dest_s3_dir": test_s3_path},
107107
)
108108
if response.status_code == HTTPStatus.OK:
109109
break

test/e2e/tests/aws/test_batch.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@
2525
@pytest.mark.usefixtures("client")
2626
@pytest.mark.parametrize("api", TEST_APIS)
2727
def test_batch_api(config: Dict, client: cx.Client, api: str):
28-
s3_bucket = config["aws"].get("s3_bucket")
29-
if not s3_bucket:
28+
s3_path = config["aws"].get("s3_path")
29+
if not s3_path:
3030
pytest.skip(
31-
"--s3-bucket option is required to run batch tests (alternatively set the "
32-
"CORTEX_TEST_BATCH_S3_BUCKET_DIR env var) )"
31+
"--s3-path option is required to run batch tests (alternatively set the "
32+
"CORTEX_TEST_BATCH_S3_PATH env var) )"
3333
)
3434

3535
e2e.tests.test_batch_api(
3636
client,
3737
api,
38-
test_bucket=s3_bucket,
38+
test_s3_path=s3_path,
3939
deploy_timeout=config["global"]["batch_deploy_timeout"],
4040
job_timeout=config["global"]["batch_job_timeout"],
4141
retry_attempts=5,

test/e2e/tests/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,24 +44,24 @@ def pytest_addoption(parser):
4444
help="set cortex GCP cluster config, to test on a new GCP cluster",
4545
)
4646
parser.addoption(
47-
"--s3-bucket",
47+
"--s3-path",
4848
action="store",
4949
default=None,
50-
help="set s3 bucket where batch jobs results will be stored",
50+
help="set s3 path where batch jobs results will be stored",
5151
)
5252

5353

5454
def pytest_configure(config):
5555
load_dotenv(".env")
5656

57-
s3_bucket = os.environ.get("CORTEX_TEST_BATCH_S3_BUCKET_DIR")
58-
s3_bucket = config.getoption("--s3-bucket") if not s3_bucket else s3_bucket
57+
s3_path = os.environ.get("CORTEX_TEST_BATCH_S3_PATH")
58+
s3_path = config.getoption("--s3-path") if not s3_path else s3_path
5959

6060
configuration = {
6161
"aws": {
6262
"env": config.getoption("--aws-env"),
6363
"config": config.getoption("--aws-config"),
64-
"s3_bucket": s3_bucket,
64+
"s3_path": s3_path,
6565
},
6666
"gcp": {
6767
"env": config.getoption("--gcp-env"),

0 commit comments

Comments
 (0)