From 278a4ef4635d96274d08bcbece4206829a927401 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:36:24 +0200 Subject: [PATCH 01/10] Update run_tests.yaml: pip install fails now, try another pip cmd --- .github/workflows/run_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 4d58f153..a66dabe0 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -35,7 +35,7 @@ jobs: - name: Install fmu-sumo run: > - pip install pip -U && + pip install --upgrade pip && pip install . - name: Run tests shell: bash From 7afcf77d064086885ddbda670ebefe56e3edd74f Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:40:48 +0200 Subject: [PATCH 02/10] Update run_tests.yaml try to get gh actions running again --- .github/workflows/run_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index a66dabe0..2ec0a921 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -35,8 +35,8 @@ jobs: - name: Install fmu-sumo run: > - pip install --upgrade pip && - pip install . + python -m pip install --upgrade pip && + python -m pip install . - name: Run tests shell: bash run: | From da653fb15bb8c752f634ac1c479e61dd0769c806 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:13:56 +0200 Subject: [PATCH 03/10] Update test_explorer.py --- tests/test_explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 0450781e..a8082c56 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -46,7 +46,7 @@ def fixture_seismic_case_uuid() -> str: """Returns seismic case uuid""" return "c616019d-d344-4094-b2ee-dd4d6d336217" -@pytest.fixture(name="explorer") +@pytest.fixture(name="explorer", token) def fixture_explorer(token: str) -> Explorer: """Returns explorer""" return Explorer("dev", token=token) From bc18f8b18c17312c67c0cdaf92168f0ebe21d3b9 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:17:33 +0200 Subject: [PATCH 04/10] Update test_explorer.py --- tests/test_explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index a8082c56..1f6d432a 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -46,7 +46,7 @@ def fixture_seismic_case_uuid() -> str: """Returns seismic case uuid""" return "c616019d-d344-4094-b2ee-dd4d6d336217" -@pytest.fixture(name="explorer", token) +@pytest.fixture(token, name="explorer") def fixture_explorer(token: str) -> Explorer: """Returns explorer""" return Explorer("dev", token=token) From 588597cb58219563a16a6281654f7726d57d0ba6 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:20:52 +0200 Subject: [PATCH 05/10] Update test_explorer.py --- tests/test_explorer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 1f6d432a..79bdbd64 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -46,7 +46,7 @@ def fixture_seismic_case_uuid() -> str: """Returns seismic case uuid""" return "c616019d-d344-4094-b2ee-dd4d6d336217" -@pytest.fixture(token, name="explorer") +@pytest.fixture(token=token, name="explorer") def fixture_explorer(token: str) -> Explorer: """Returns explorer""" return Explorer("dev", token=token) From bf4bd03caf79d88d6abcac99de3c40e6426e7aab Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:27:00 +0200 Subject: [PATCH 06/10] Update test_explorer.py --- tests/test_explorer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 79bdbd64..3610d606 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -46,9 +46,10 @@ def fixture_seismic_case_uuid() -> str: """Returns seismic case uuid""" return "c616019d-d344-4094-b2ee-dd4d6d336217" -@pytest.fixture(token=token, name="explorer") +@pytest.fixture(name="explorer") def fixture_explorer(token: str) -> Explorer: """Returns explorer""" + print("TKN:", token) return Explorer("dev", token=token) From b6d079e73e74946eb4f3ba68d4be6bc343ef03ef Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:33:23 +0200 Subject: [PATCH 07/10] Update test_explorer.py --- tests/test_explorer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 3610d606..df541f6b 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -50,6 +50,8 @@ def fixture_seismic_case_uuid() -> str: def fixture_explorer(token: str) -> Explorer: """Returns explorer""" print("TKN:", token) + print("TKN2:", len(token)) + print("TKN3:", token[0:9]) return Explorer("dev", token=token) From 847cbdb9d6eb9f412f4e091072db734f1a18db08 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:45:34 +0200 Subject: [PATCH 08/10] Update test_explorer.py --- tests/test_explorer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index df541f6b..ebeea4cc 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -52,7 +52,9 @@ def fixture_explorer(token: str) -> Explorer: print("TKN:", token) print("TKN2:", len(token)) print("TKN3:", token[0:9]) - return Explorer("dev", token=token) + sumo = Explorer("dev", token=token) + print(sumo.cases[0].name) + return sumo @pytest.fixture(name="test_case") From dcf9f40d73f1e19d59f8449f862a3d50d77420e7 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:55:08 +0200 Subject: [PATCH 09/10] Update test_explorer.py --- tests/test_explorer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index ebeea4cc..65e6a711 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -66,9 +66,9 @@ def fixture_test_case(explorer: Explorer, case_name: str) -> Case: @pytest.fixture(name="sumo_client") -def fixture_sumo_client(): +def fixture_sumo_client(token: str): """Returns SumoClient for dev env""" - return SumoClient("dev") + return SumoClient("dev", token=token) @pytest.fixture(name="utils") From 6ee80f89f5760f85988ca29811250d5bb77861d9 Mon Sep 17 00:00:00 2001 From: Roy Willy Haug <5484176+roywilly@users.noreply.github.com> Date: Tue, 17 Oct 2023 14:01:44 +0200 Subject: [PATCH 10/10] Update test_explorer.py --- tests/test_explorer.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/test_explorer.py b/tests/test_explorer.py index 65e6a711..14284b09 100644 --- a/tests/test_explorer.py +++ b/tests/test_explorer.py @@ -49,12 +49,7 @@ def fixture_seismic_case_uuid() -> str: @pytest.fixture(name="explorer") def fixture_explorer(token: str) -> Explorer: """Returns explorer""" - print("TKN:", token) - print("TKN2:", len(token)) - print("TKN3:", token[0:9]) - sumo = Explorer("dev", token=token) - print(sumo.cases[0].name) - return sumo + return Explorer("dev", token=token) @pytest.fixture(name="test_case")