Skip to content

Commit

Permalink
Fix nightly tests by finding a case which has iterations and surfaces (
Browse files Browse the repository at this point in the history
…#301)

* Fix nightly tests by finding a case which has iterations and surfaces

* Improve
  • Loading branch information
roywilly authored Mar 6, 2024
1 parent 9ab6ce2 commit aa67ae5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 9 deletions.
16 changes: 13 additions & 3 deletions tests/test_access/tst_access_drogon_manage_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ def test_aggregations_bulk(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
print("About to trigger aggregation on case", case_uuid)
body = {
Expand All @@ -121,10 +126,15 @@ def test_aggregations_fast(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
print("About to trigger fast-aggregation on case", case_uuid)
surface_uuid = cases[0].surfaces[0].uuid
surface_uuid = case.surfaces[0].uuid
print("using object_id of first surface:", surface_uuid)
body = {
"operations": ["min"],
Expand Down
16 changes: 13 additions & 3 deletions tests/test_access/tst_access_drogon_read_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,14 @@ def test_aggregations_fast(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
surface_uuid = cases[0].surfaces[0].uuid
surface_uuid = case.surfaces[0].uuid
print("using object_id of first surface:", surface_uuid)
body = {
"operations": ["min"],
Expand All @@ -126,7 +131,12 @@ def test_aggregate_bulk(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
body = {
"operations": ["min"],
Expand Down
16 changes: 13 additions & 3 deletions tests/test_access/tst_access_drogon_write_login.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ def test_aggregate_bulk(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
print("About to trigger aggregation on case", case_uuid)
body = {
Expand All @@ -121,10 +126,15 @@ def test_aggregations_fast(explorer: Explorer):
cases = explorer.cases
print("Number of cases: ", len(cases))
assert len(cases) > 0
case = cases[0]
case = None
for c in cases:
if len(c.iterations) > 0 and len(c.surfaces) > 40:
case = c
break
assert case
case_uuid = case.metadata.get("fmu").get("case").get("uuid")
print("About to trigger fast-aggregation on case", case_uuid)
surface_uuid = cases[0].surfaces[0].uuid
surface_uuid = case.surfaces[0].uuid
print("using object_id of first surface:", surface_uuid)
body = {
"operations": ["min"],
Expand Down

0 comments on commit aa67ae5

Please sign in to comment.