From 22d4f074fd63bb9a4d50442e4d551c5d4b4df75d Mon Sep 17 00:00:00 2001 From: Aidan Hilt Date: Tue, 23 May 2023 17:14:39 -0400 Subject: [PATCH 01/23] Changing to use the new version of the python unit test action, up-to-date with master --- .github/workflows/unittests.yaml | 7 +++++++ .secrets.baseline | 2 +- tests/ci_commands_script.sh | 1 + tests/ci_setup.sh | 6 ++++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/unittests.yaml create mode 100644 tests/ci_commands_script.sh create mode 100644 tests/ci_setup.sh diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml new file mode 100644 index 000000000..499f1cbe1 --- /dev/null +++ b/.github/workflows/unittests.yaml @@ -0,0 +1,7 @@ +name: Run Fence unit tests +on: push +jobs: + run_tests: + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@3d02e24e36d579e3ad4f6f065980684605fdcbea + with: + postgres-needed: 'true' diff --git a/.secrets.baseline b/.secrets.baseline index 2423d6566..4f1ca14ad 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -368,5 +368,5 @@ } ] }, - "generated_at": "2023-05-15T16:30:09Z" + "generated_at": "2023-05-18T19:06:37Z" } diff --git a/tests/ci_commands_script.sh b/tests/ci_commands_script.sh new file mode 100644 index 000000000..c53e1fe40 --- /dev/null +++ b/tests/ci_commands_script.sh @@ -0,0 +1 @@ +poetry run pytest -vv --cov=fence --cov=migrations/versions --cov-report xml tests diff --git a/tests/ci_setup.sh b/tests/ci_setup.sh new file mode 100644 index 000000000..5adf5c247 --- /dev/null +++ b/tests/ci_setup.sh @@ -0,0 +1,6 @@ +psql -c 'SELECT version();' -U postgres +psql -U postgres -c "create database fence_test_tmp" + +sudo rm -f /etc/boto.cfg +mkdir -p tests/resources/keys; cd tests/resources/keys; openssl genrsa -out test_private_key.pem 2048; openssl rsa -in test_private_key.pem -pubout -out test_public_key.pem +openssl genrsa -out test_private_key_2.pem 2048; openssl rsa -in test_private_key_2.pem -pubout -out test_public_key_2.pem From 2275a7a64f912c4c0f60a4c245f85b8465aae88d Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:18:30 -0400 Subject: [PATCH 02/23] Update unittests.yaml --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 499f1cbe1..f6d26440e 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@3d02e24e36d579e3ad4f6f065980684605fdcbea + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@80066424162580ee47367cb6138bb57a8479323d with: postgres-needed: 'true' From 4b5090cfb295d50ca6ccf885d64b76f215fb81ae Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:21:19 -0400 Subject: [PATCH 03/23] Update unittests.yaml --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index f6d26440e..bf332b867 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -4,4 +4,4 @@ jobs: run_tests: uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@80066424162580ee47367cb6138bb57a8479323d with: - postgres-needed: 'true' + postgres-needed: 'false' From 7897eda20105fd0ca47f5e78a8f290cd08ec8af3 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:42:13 -0400 Subject: [PATCH 04/23] Update unittests.yaml --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index bf332b867..4f9200def 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@80066424162580ee47367cb6138bb57a8479323d + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@cfa52318402cf911cc45a0c57cf8ad1946d12b61 with: postgres-needed: 'false' From 309399ade27b88ad9edf42c7a7f1a061f686cca6 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:45:15 -0400 Subject: [PATCH 05/23] Update unittests.yaml --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 4f9200def..46eff4a68 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@cfa52318402cf911cc45a0c57cf8ad1946d12b61 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@0595a1334e31a98016d2fa0cd919ec0919d4e506 with: postgres-needed: 'false' From dd36affba9c28f7643885794036f2656a2c429d9 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:50:37 -0400 Subject: [PATCH 06/23] Update unittests.yaml --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 46eff4a68..165c8b42c 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@0595a1334e31a98016d2fa0cd919ec0919d4e506 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@18e132ef3e439e0410a13c23fcf0a2409d367e29 with: postgres-needed: 'false' From 29c45e639261b3490f9e666b30be8ed05da23465 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 17:56:50 -0400 Subject: [PATCH 07/23] Updated python_unit_test workflow --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 165c8b42c..bf28703fd 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@18e132ef3e439e0410a13c23fcf0a2409d367e29 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@98ad877b9101b4b764ec2482877a2817b956b93d with: postgres-needed: 'false' From 1719a914b07850d39572fab3535d14f9a5d50a62 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 18:00:00 -0400 Subject: [PATCH 08/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index bf28703fd..7e0ecf1c0 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@98ad877b9101b4b764ec2482877a2817b956b93d + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@a2fafbda67ac0adaea8d903347f3a766c4d582b8 with: postgres-needed: 'false' From 7a8c4a24b03dc5dd1a3891a17610f8cfe40c7d62 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Tue, 23 May 2023 18:02:12 -0400 Subject: [PATCH 09/23] Updated Action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 7e0ecf1c0..dda0bc3a7 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@a2fafbda67ac0adaea8d903347f3a766c4d582b8 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@7e9db689cefbdea85b0c6d6f89dcfe71319a497f with: postgres-needed: 'false' From 2f1f7f21b653b0b34e0ed346b44abac87493c07d Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 11:27:22 -0400 Subject: [PATCH 10/23] Updating action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index dda0bc3a7..8a206c6fc 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@7e9db689cefbdea85b0c6d6f89dcfe71319a497f + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@f40608b307c01441a1d45ae4f10f11a1aea1738c with: postgres-needed: 'false' From 7b48c70af52f3ec528d6c7d172fbe02f59a1d3a2 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 11:50:04 -0400 Subject: [PATCH 11/23] Updating action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 8a206c6fc..7a1baaa67 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@f40608b307c01441a1d45ae4f10f11a1aea1738c + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@d9d254553b0284af9b49f389fef629c6934db73f with: postgres-needed: 'false' From dc96bc6d2d2708eab711edf49084bc82a66b6a3d Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 12:26:40 -0400 Subject: [PATCH 12/23] Updating branch version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 7a1baaa67..0dc4e1c09 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@d9d254553b0284af9b49f389fef629c6934db73f + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@e805f4819a5bcae009c57f48cfcd1a0d05dc45b3 with: postgres-needed: 'false' From 7809690d9cfc39675da4d643c8b37d67785ddd15 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 12:42:27 -0400 Subject: [PATCH 13/23] Updating action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 0dc4e1c09..0418fa30a 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@e805f4819a5bcae009c57f48cfcd1a0d05dc45b3 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@44decddf85cc297a3d21c0552d2a492ec5ede11b with: postgres-needed: 'false' From a46122e5fdc1a3c47664f1480c03bbd395308aec Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 13:06:45 -0400 Subject: [PATCH 14/23] Update ci_setup.sh --- tests/ci_setup.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/ci_setup.sh b/tests/ci_setup.sh index 5adf5c247..3c5eb34b1 100644 --- a/tests/ci_setup.sh +++ b/tests/ci_setup.sh @@ -1,3 +1,7 @@ +PGPASSWORD=postgres +POSTGRES_HOST=localhost +POSTGRES_PORT=5432 + psql -c 'SELECT version();' -U postgres psql -U postgres -c "create database fence_test_tmp" From 9c14e7f2a79d4661083bbb8d9fe2ad17ea933f1a Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 13:09:29 -0400 Subject: [PATCH 15/23] Update ci_setup.sh --- tests/ci_setup.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/ci_setup.sh b/tests/ci_setup.sh index 3c5eb34b1..092dea919 100644 --- a/tests/ci_setup.sh +++ b/tests/ci_setup.sh @@ -1,8 +1,4 @@ -PGPASSWORD=postgres -POSTGRES_HOST=localhost -POSTGRES_PORT=5432 - -psql -c 'SELECT version();' -U postgres +PGPASSWORD=postgres PGHOST=localhost PGPORT=5432 psql -c 'SELECT version();' -U postgres psql -U postgres -c "create database fence_test_tmp" sudo rm -f /etc/boto.cfg From 5b902b114ab6e9a30cfcc423e6bf65053469183c Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 13:13:02 -0400 Subject: [PATCH 16/23] Update ci_setup.sh --- tests/ci_setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci_setup.sh b/tests/ci_setup.sh index 092dea919..5adf5c247 100644 --- a/tests/ci_setup.sh +++ b/tests/ci_setup.sh @@ -1,4 +1,4 @@ -PGPASSWORD=postgres PGHOST=localhost PGPORT=5432 psql -c 'SELECT version();' -U postgres +psql -c 'SELECT version();' -U postgres psql -U postgres -c "create database fence_test_tmp" sudo rm -f /etc/boto.cfg From 0cc87bd5d4502eee725849fa2a8791e67bceaa63 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Wed, 24 May 2023 13:14:15 -0400 Subject: [PATCH 17/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 0418fa30a..522ec0713 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@44decddf85cc297a3d21c0552d2a492ec5ede11b + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@25675353ab2e145ecea0fcc9e63f979e5f7f769e with: postgres-needed: 'false' From 6aa7f137f4719f465102101ba49061ce9df9e5f5 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 14:46:49 -0400 Subject: [PATCH 18/23] Updating action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 522ec0713..3b6e2c27a 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,6 +2,6 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@25675353ab2e145ecea0fcc9e63f979e5f7f769e + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@27516b5385d75dfebb0f6d74e9b0bc89f269e695 with: postgres-needed: 'false' From db7a36038a87f4cade2cf06de12ae861af3f2830 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 14:48:29 -0400 Subject: [PATCH 19/23] Removed the postgres_needed argument --- .github/workflows/unittests.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 3b6e2c27a..541f86d46 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -3,5 +3,3 @@ on: push jobs: run_tests: uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@27516b5385d75dfebb0f6d74e9b0bc89f269e695 - with: - postgres-needed: 'false' From c0be54c1230c2cca92cbcdf3d08ced39f20bb1bf Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 14:51:20 -0400 Subject: [PATCH 20/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 541f86d46..748a7b3de 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,4 +2,4 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@27516b5385d75dfebb0f6d74e9b0bc89f269e695 + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@94e22a606d536b544f8f407ad028c3bfdc90e38b From fe93fd8a58cf49f3851435bc0bf1f9926b6b058c Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 14:53:46 -0400 Subject: [PATCH 21/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 748a7b3de..369485320 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,4 +2,4 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@94e22a606d536b544f8f407ad028c3bfdc90e38b + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@5cf10ee49be80ed18ddb4dc3f572d4fa5a35562e From 6db927114158985b91473ae61c1800e319371a85 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 16:47:28 -0400 Subject: [PATCH 22/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 369485320..32bdf1a37 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,4 +2,4 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@5cf10ee49be80ed18ddb4dc3f572d4fa5a35562e + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@a12acee0ce4fd21e34208f8a8e66ec5fd88cb61b From c94ad9224230a61453ff4957af284cb029dcf512 Mon Sep 17 00:00:00 2001 From: Aidan Hilt <11202897+AidanHilt@users.noreply.github.com> Date: Thu, 25 May 2023 17:25:14 -0400 Subject: [PATCH 23/23] Updated action version --- .github/workflows/unittests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 32bdf1a37..2c0ddb9c6 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -2,4 +2,4 @@ name: Run Fence unit tests on: push jobs: run_tests: - uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@a12acee0ce4fd21e34208f8a8e66ec5fd88cb61b + uses: uc-cdis/.github/.github/workflows/python_unit_test.yaml@8445812b85abd7246fc88c2db3726c292595708f