Skip to content

Commit 93baf45

Browse files
committed
Fix session notebook tests
1 parent f9b97cd commit 93baf45

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

scripts/ci/aura_api_ci.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ def _update_token(self) -> AuraAuthToken:
4848

4949
return AuraApiCI.AuraAuthToken(response.json())
5050

51-
def create_ds_instance(self, name: str) -> dict[str, Any]:
52-
return self.create_instance(name, memory="8GB", type="gds")
53-
5451
def create_instance(self, name: str, memory: str, type: str) -> dict[str, Any]:
5552
CREATE_OK_MAX_WAIT_TIME = 10
5653

@@ -81,7 +78,13 @@ def create_instance(self, name: str, memory: str, type: str) -> dict[str, Any]:
8178
if should_retry:
8279
logging.debug(f"Error code: {response.status_code} - Retrying in {wait_time} s")
8380

84-
return response.json()["data"] # type: ignore
81+
82+
response_json = response.json()
83+
if "errors" in response_json:
84+
raise Exception(response_json["errors"])
85+
86+
return response_json["data"] # type: ignore
87+
8588

8689
def check_running(self, db_id: str) -> None:
8790
RUNNING_MAX_WAIT_TIME = 60 * 5

scripts/ci/run_targeting_aura_sessions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def main() -> None:
2222
MAX_INT = 1000000
2323
instance_name = f"ci-build-{sys.argv[1]}" if len(sys.argv) > 1 else "ci-instance-" + str(rd.randint(0, MAX_INT))
2424

25-
create_result = aura_api.create_instance(instance_name, memory="1GB", type="professional-db")
25+
create_result = aura_api.create_instance(instance_name, memory="2GB", type="enterprise-db")
2626
instance_id = create_result["id"]
2727
logging.info(f"Creation of database with id '{instance_id}'")
2828

@@ -49,7 +49,7 @@ def handle_signal(sig: int, frame: Optional[FrameType]) -> None:
4949
else:
5050
project_id_part = ""
5151

52-
cmd = f"CLIENT_ID={client_id} CLIENT_SECRET={client_secret} {project_id_part} NEO4J_URI={uri} NEO4J_USERNAME={username} NEO4J_PASSWORD={password} tox -e jupyter-notebook-session-ci"
52+
cmd = f"AURA_ENV=staging CLIENT_ID={client_id} CLIENT_SECRET={client_secret} {project_id_part} NEO4J_URI={uri} NEO4J_USERNAME={username} NEO4J_PASSWORD={password} tox -e jupyter-notebook-session-ci"
5353

5454
if os.system(cmd) != 0:
5555
raise Exception("Failed to run notebooks")

0 commit comments

Comments
 (0)