Skip to content

Commit

Permalink
Update integration tests to centralize mission model path
Browse files Browse the repository at this point in the history
  • Loading branch information
cartermak committed Oct 19, 2023
1 parent e2e0507 commit e914c2b
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 26 deletions.
5 changes: 5 additions & 0 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
FILES_PATH = os.path.join(TEST_DIR, "files")
CONFIGURATIONS_PATH = os.path.join(FILES_PATH, "configuration")
CONFIGURATION_PATH = os.path.join(CONFIGURATIONS_PATH, "localhost_config.json")
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_VERSION = os.environ.get("AERIE_VERSION", "1.13.0")
MODEL_JAR = os.path.join(MODELS_PATH, f"banananation-{MODEL_VERSION}.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"

# Login to add additional users to the `users` table
for username in ADDITIONAL_USERS:
Expand Down
6 changes: 1 addition & 5 deletions tests/integration_tests/test_constraints.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typer.testing import CliRunner

from .conftest import client
from .conftest import client, MODEL_JAR, MODEL_NAME, MODEL_VERSION
from aerie_cli.__main__ import app

from aerie_cli.schemas.client import ActivityPlanCreate
Expand All @@ -16,10 +16,6 @@
FILES_PATH = os.path.join(TEST_DIR, "files")

# Model Variables
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_JAR = os.path.join(MODELS_PATH, "banananation-1.12.0.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
model_id = -1

# Plan Variables
Expand Down
6 changes: 1 addition & 5 deletions tests/integration_tests/test_expansion.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from aerie_cli.__main__ import app
from aerie_cli.schemas.client import ActivityPlanCreate

from .conftest import client
from .conftest import client, MODEL_JAR, MODEL_NAME, MODEL_VERSION

runner = CliRunner(mix_stderr = False)

Expand All @@ -19,10 +19,6 @@
DOWNLOADED_FILE_NAME = "downloaded_file.test"

# Model Variables
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_JAR = os.path.join(MODELS_PATH, "banananation-1.12.0.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
model_id = -1

# Plan Variables
Expand Down
7 changes: 1 addition & 6 deletions tests/integration_tests/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from aerie_cli.__main__ import app

from .conftest import client
from .conftest import client, MODEL_JAR, MODEL_NAME, MODEL_VERSION

runner = CliRunner(mix_stderr = False)

Expand All @@ -13,11 +13,6 @@
FILES_PATH = os.path.join(TEST_DIR, "files")

# Model Variables
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_VERSION = os.environ.get("AERIE_VERSION", "1.13.0")
MODEL_JAR = os.path.join(MODELS_PATH, f"banananation-{MODEL_VERSION}.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
model_id = -1

def test_model_clean():
Expand Down
6 changes: 1 addition & 5 deletions tests/integration_tests/test_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from aerie_cli.__main__ import app
from aerie_cli.commands import plans

from .conftest import client, DOWNLOADED_FILE_NAME, ADDITIONAL_USERS
from .conftest import client, DOWNLOADED_FILE_NAME, ADDITIONAL_USERS, MODEL_JAR, MODEL_NAME, MODEL_VERSION

runner = CliRunner(mix_stderr = False)

Expand All @@ -18,10 +18,6 @@
DOWNLOADED_FILE_NAME = "downloaded_file.test"

# Model Variables
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_JAR = os.path.join(MODELS_PATH, "banananation-1.12.0.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
model_id = -1

# Plan Variables
Expand Down
6 changes: 1 addition & 5 deletions tests/integration_tests/test_scheduling.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from aerie_cli.__main__ import app
from aerie_cli.schemas.client import ActivityPlanCreate

from .conftest import client
from .conftest import client, MODEL_JAR, MODEL_NAME, MODEL_VERSION

runner = CliRunner(mix_stderr = False)

Expand All @@ -19,10 +19,6 @@
DOWNLOADED_FILE_NAME = "downloaded_file.test"

# Model Variables
MODELS_PATH = os.path.join(FILES_PATH, "models")
MODEL_JAR = os.path.join(MODELS_PATH, "banananation-1.12.0.jar")
MODEL_NAME = "banananation"
MODEL_VERSION = "0.0.1"
model_id = 0

# Plan Variables
Expand Down

0 comments on commit e914c2b

Please sign in to comment.