From 582949af342c9b135db0bdd212f16f5a30f8595a Mon Sep 17 00:00:00 2001 From: Roy Willy Haug Date: Tue, 6 Feb 2024 08:18:35 +0100 Subject: [PATCH] CLosing in --- .../workflows/run_tests_access_drogon_manage_login.yaml | 3 +-- .github/workflows/run_tests_access_drogon_read_login.yaml | 3 +-- .github/workflows/run_tests_access_drogon_write_login.yaml | 3 +-- .github/workflows/run_tests_access_no_access_login.yaml | 3 +-- tests/test_access/tst_access_no_access_login.py | 7 ++----- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/run_tests_access_drogon_manage_login.yaml b/.github/workflows/run_tests_access_drogon_manage_login.yaml index 68cd7462..87177a65 100644 --- a/.github/workflows/run_tests_access_drogon_manage_login.yaml +++ b/.github/workflows/run_tests_access_drogon_manage_login.yaml @@ -1,10 +1,9 @@ name: Test access to Sumo with DROGON-MANAGE login on: - pull_request: - branches: [main] schedule: - cron: "44 4 * * *" + workflow_dispatch: jobs: build_pywheels: diff --git a/.github/workflows/run_tests_access_drogon_read_login.yaml b/.github/workflows/run_tests_access_drogon_read_login.yaml index 2ba058fe..c27ae5ab 100644 --- a/.github/workflows/run_tests_access_drogon_read_login.yaml +++ b/.github/workflows/run_tests_access_drogon_read_login.yaml @@ -1,10 +1,9 @@ name: Test access to Sumo with DROGON-READ login on: - pull_request: - branches: [main] schedule: - cron: "24 4 * * *" + workflow_dispatch: jobs: build_pywheels: diff --git a/.github/workflows/run_tests_access_drogon_write_login.yaml b/.github/workflows/run_tests_access_drogon_write_login.yaml index bc9e6261..77fab22c 100644 --- a/.github/workflows/run_tests_access_drogon_write_login.yaml +++ b/.github/workflows/run_tests_access_drogon_write_login.yaml @@ -1,10 +1,9 @@ name: Test access to Sumo with DROGON-WRITE login on: - pull_request: - branches: [main] schedule: - cron: "34 4 * * *" + workflow_dispatch: jobs: build_pywheels: diff --git a/.github/workflows/run_tests_access_no_access_login.yaml b/.github/workflows/run_tests_access_no_access_login.yaml index 6c71e9aa..586d8d4a 100644 --- a/.github/workflows/run_tests_access_no_access_login.yaml +++ b/.github/workflows/run_tests_access_no_access_login.yaml @@ -1,10 +1,9 @@ name: Test access to Sumo with NO-ACCESS login on: - pull_request: - branches: [main] schedule: - cron: "54 4 * * *" + workflow_dispatch: jobs: build_pywheels: diff --git a/tests/test_access/tst_access_no_access_login.py b/tests/test_access/tst_access_no_access_login.py index 6a72f86b..d2f28098 100644 --- a/tests/test_access/tst_access_no_access_login.py +++ b/tests/test_access/tst_access_no_access_login.py @@ -47,9 +47,7 @@ def test_get_userpermissions(explorer: Explorer): print("/Userpermissions response: ", response.text) userperms = json.loads(response.text) assert "Drogon" not in userperms - # assert "read" not in userperms.get("Drogon") - # assert 1 == len(userperms.get("Drogon")) - # assert 1 == len(userperms) + assert 0 == len(userperms) def test_get_cases(explorer: Explorer): @@ -67,7 +65,6 @@ def test_write(explorer: Explorer): print("Running test:", inspect.currentframe().f_code.co_name) cases = explorer.cases print("Number of cases: ", len(cases)) - # assert len(cases) == 0 with open("./tests/data/test_case_080/case2.json") as json_file: metadata = json.load(json_file) @@ -87,7 +84,7 @@ def test_read_restricted_classification_data(explorer: Explorer): print("Running test:", inspect.currentframe().f_code.co_name) cases = explorer.cases print("Number of cases: ", len(cases)) - # assert len(cases) > 0 + assert len(cases) > 0 # A default Drogon iteration contains 2 restricted objects, # so in normal situations there should be some restricted objects