From adc80df4d8bbac8dcd1a39ae95ee1799c77fdb10 Mon Sep 17 00:00:00 2001 From: Federico Nahuel Quijada <63385953+FedeNQ@users.noreply.github.com> Date: Wed, 12 Jul 2023 15:52:22 -0300 Subject: [PATCH] Move IT folder into .github folder (#15) * Move IT folder to .github folder Signed-off-by: FedeNQ * Add ./.github/it to working directory Signed-off-by: FedeNQ * Change target_dir in tests Signed-off-by: FedeNQ * Change target_dir Signed-off-by: FedeNQ * Change target_dir Signed-off-by: FedeNQ * Add /.github in path Signed-off-by: FedeNQ * change on docker-compose Signed-off-by: FedeNQ * change target_dir in run-postgres-test Signed-off-by: FedeNQ --------- Signed-off-by: FedeNQ --- {it => .github/it}/build.sh | 0 {it => .github/it}/change-entry-client-test.sh | 0 {it => .github/it}/client/Dockerfile | 0 {it => .github/it}/client/assert.sh | 0 {it => .github/it}/client/client.go | 0 {it => .github/it}/client/helper.conf | 0 {it => .github/it}/client/mysql-connect.sh | 0 {it => .github/it}/client/postgres-connect.sh | 0 {it => .github/it}/docker-compose.yaml | 4 ++-- {it => .github/it}/go-server/Dockerfile | 0 {it => .github/it}/go-server/helper.conf | 0 {it => .github/it}/go-server/server.go | 0 {it => .github/it}/integration_test.sh | 0 {it => .github/it}/mysql/Dockerfile | 0 {it => .github/it}/mysql/helper.conf | 0 {it => .github/it}/mysql/init.sql | 0 {it => .github/it}/mysql/mysqld.cnf | 0 {it => .github/it}/postgres/Dockerfile | 0 {it => .github/it}/postgres/helper.conf | 0 {it => .github/it}/postgres/init.sql | 0 {it => .github/it}/postgres/pg_hba.conf | 0 {it => .github/it}/postgres/postgresql.conf | 0 {it => .github/it}/postgres/reload_certificates.sh | 0 .github/it/reset.sh | 6 ++++++ {it => .github/it}/run-go-test.sh | 0 {it => .github/it}/run-mysql-test.sh | 0 {it => .github/it}/run-postgres-test.sh | 0 {it => .github/it}/spiffe-helper/Dockerfile | 0 {it => .github/it}/spire/agent/agent.conf | 0 {it => .github/it}/spire/agent/agent.crt.pem | 0 {it => .github/it}/spire/agent/agent.key.pem | 0 {it => .github/it}/spire/server/agent-cacert.pem | 0 {it => .github/it}/spire/server/server.conf | 0 .github/tests/change-entry-test.sh | 2 +- .github/tests/restore-entry-test.sh | 2 +- .github/tests/run-go-test.sh | 2 +- .github/tests/run-mysql-test.sh | 2 +- .github/tests/run-postgres-test.sh | 2 +- .github/workflows/pr_build.yaml | 2 +- 39 files changed, 14 insertions(+), 8 deletions(-) rename {it => .github/it}/build.sh (100%) rename {it => .github/it}/change-entry-client-test.sh (100%) rename {it => .github/it}/client/Dockerfile (100%) rename {it => .github/it}/client/assert.sh (100%) rename {it => .github/it}/client/client.go (100%) rename {it => .github/it}/client/helper.conf (100%) rename {it => .github/it}/client/mysql-connect.sh (100%) rename {it => .github/it}/client/postgres-connect.sh (100%) rename {it => .github/it}/docker-compose.yaml (96%) rename {it => .github/it}/go-server/Dockerfile (100%) rename {it => .github/it}/go-server/helper.conf (100%) rename {it => .github/it}/go-server/server.go (100%) rename {it => .github/it}/integration_test.sh (100%) rename {it => .github/it}/mysql/Dockerfile (100%) rename {it => .github/it}/mysql/helper.conf (100%) rename {it => .github/it}/mysql/init.sql (100%) rename {it => .github/it}/mysql/mysqld.cnf (100%) rename {it => .github/it}/postgres/Dockerfile (100%) rename {it => .github/it}/postgres/helper.conf (100%) rename {it => .github/it}/postgres/init.sql (100%) rename {it => .github/it}/postgres/pg_hba.conf (100%) rename {it => .github/it}/postgres/postgresql.conf (100%) rename {it => .github/it}/postgres/reload_certificates.sh (100%) create mode 100644 .github/it/reset.sh rename {it => .github/it}/run-go-test.sh (100%) rename {it => .github/it}/run-mysql-test.sh (100%) rename {it => .github/it}/run-postgres-test.sh (100%) rename {it => .github/it}/spiffe-helper/Dockerfile (100%) rename {it => .github/it}/spire/agent/agent.conf (100%) rename {it => .github/it}/spire/agent/agent.crt.pem (100%) rename {it => .github/it}/spire/agent/agent.key.pem (100%) rename {it => .github/it}/spire/server/agent-cacert.pem (100%) rename {it => .github/it}/spire/server/server.conf (100%) diff --git a/it/build.sh b/.github/it/build.sh similarity index 100% rename from it/build.sh rename to .github/it/build.sh diff --git a/it/change-entry-client-test.sh b/.github/it/change-entry-client-test.sh similarity index 100% rename from it/change-entry-client-test.sh rename to .github/it/change-entry-client-test.sh diff --git a/it/client/Dockerfile b/.github/it/client/Dockerfile similarity index 100% rename from it/client/Dockerfile rename to .github/it/client/Dockerfile diff --git a/it/client/assert.sh b/.github/it/client/assert.sh similarity index 100% rename from it/client/assert.sh rename to .github/it/client/assert.sh diff --git a/it/client/client.go b/.github/it/client/client.go similarity index 100% rename from it/client/client.go rename to .github/it/client/client.go diff --git a/it/client/helper.conf b/.github/it/client/helper.conf similarity index 100% rename from it/client/helper.conf rename to .github/it/client/helper.conf diff --git a/it/client/mysql-connect.sh b/.github/it/client/mysql-connect.sh similarity index 100% rename from it/client/mysql-connect.sh rename to .github/it/client/mysql-connect.sh diff --git a/it/client/postgres-connect.sh b/.github/it/client/postgres-connect.sh similarity index 100% rename from it/client/postgres-connect.sh rename to .github/it/client/postgres-connect.sh diff --git a/it/docker-compose.yaml b/.github/it/docker-compose.yaml similarity index 96% rename from it/docker-compose.yaml rename to .github/it/docker-compose.yaml index d8fe0377..9ee4ed34 100644 --- a/it/docker-compose.yaml +++ b/.github/it/docker-compose.yaml @@ -19,8 +19,8 @@ services: spiffe-helper: build: - context: ../ - dockerfile: ./it/spiffe-helper/Dockerfile + context: ../../ + dockerfile: ./.github/it/spiffe-helper/Dockerfile postgres-db: build: postgres diff --git a/it/go-server/Dockerfile b/.github/it/go-server/Dockerfile similarity index 100% rename from it/go-server/Dockerfile rename to .github/it/go-server/Dockerfile diff --git a/it/go-server/helper.conf b/.github/it/go-server/helper.conf similarity index 100% rename from it/go-server/helper.conf rename to .github/it/go-server/helper.conf diff --git a/it/go-server/server.go b/.github/it/go-server/server.go similarity index 100% rename from it/go-server/server.go rename to .github/it/go-server/server.go diff --git a/it/integration_test.sh b/.github/it/integration_test.sh similarity index 100% rename from it/integration_test.sh rename to .github/it/integration_test.sh diff --git a/it/mysql/Dockerfile b/.github/it/mysql/Dockerfile similarity index 100% rename from it/mysql/Dockerfile rename to .github/it/mysql/Dockerfile diff --git a/it/mysql/helper.conf b/.github/it/mysql/helper.conf similarity index 100% rename from it/mysql/helper.conf rename to .github/it/mysql/helper.conf diff --git a/it/mysql/init.sql b/.github/it/mysql/init.sql similarity index 100% rename from it/mysql/init.sql rename to .github/it/mysql/init.sql diff --git a/it/mysql/mysqld.cnf b/.github/it/mysql/mysqld.cnf similarity index 100% rename from it/mysql/mysqld.cnf rename to .github/it/mysql/mysqld.cnf diff --git a/it/postgres/Dockerfile b/.github/it/postgres/Dockerfile similarity index 100% rename from it/postgres/Dockerfile rename to .github/it/postgres/Dockerfile diff --git a/it/postgres/helper.conf b/.github/it/postgres/helper.conf similarity index 100% rename from it/postgres/helper.conf rename to .github/it/postgres/helper.conf diff --git a/it/postgres/init.sql b/.github/it/postgres/init.sql similarity index 100% rename from it/postgres/init.sql rename to .github/it/postgres/init.sql diff --git a/it/postgres/pg_hba.conf b/.github/it/postgres/pg_hba.conf similarity index 100% rename from it/postgres/pg_hba.conf rename to .github/it/postgres/pg_hba.conf diff --git a/it/postgres/postgresql.conf b/.github/it/postgres/postgresql.conf similarity index 100% rename from it/postgres/postgresql.conf rename to .github/it/postgres/postgresql.conf diff --git a/it/postgres/reload_certificates.sh b/.github/it/postgres/reload_certificates.sh similarity index 100% rename from it/postgres/reload_certificates.sh rename to .github/it/postgres/reload_certificates.sh diff --git a/.github/it/reset.sh b/.github/it/reset.sh new file mode 100644 index 00000000..2f9cd8b7 --- /dev/null +++ b/.github/it/reset.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +# use only to clean docker +docker compose stop +docker system prune +docker rmi $(docker images -qa) \ No newline at end of file diff --git a/it/run-go-test.sh b/.github/it/run-go-test.sh similarity index 100% rename from it/run-go-test.sh rename to .github/it/run-go-test.sh diff --git a/it/run-mysql-test.sh b/.github/it/run-mysql-test.sh similarity index 100% rename from it/run-mysql-test.sh rename to .github/it/run-mysql-test.sh diff --git a/it/run-postgres-test.sh b/.github/it/run-postgres-test.sh similarity index 100% rename from it/run-postgres-test.sh rename to .github/it/run-postgres-test.sh diff --git a/it/spiffe-helper/Dockerfile b/.github/it/spiffe-helper/Dockerfile similarity index 100% rename from it/spiffe-helper/Dockerfile rename to .github/it/spiffe-helper/Dockerfile diff --git a/it/spire/agent/agent.conf b/.github/it/spire/agent/agent.conf similarity index 100% rename from it/spire/agent/agent.conf rename to .github/it/spire/agent/agent.conf diff --git a/it/spire/agent/agent.crt.pem b/.github/it/spire/agent/agent.crt.pem similarity index 100% rename from it/spire/agent/agent.crt.pem rename to .github/it/spire/agent/agent.crt.pem diff --git a/it/spire/agent/agent.key.pem b/.github/it/spire/agent/agent.key.pem similarity index 100% rename from it/spire/agent/agent.key.pem rename to .github/it/spire/agent/agent.key.pem diff --git a/it/spire/server/agent-cacert.pem b/.github/it/spire/server/agent-cacert.pem similarity index 100% rename from it/spire/server/agent-cacert.pem rename to .github/it/spire/server/agent-cacert.pem diff --git a/it/spire/server/server.conf b/.github/it/spire/server/server.conf similarity index 100% rename from it/spire/server/server.conf rename to .github/it/spire/server/server.conf diff --git a/.github/tests/change-entry-test.sh b/.github/tests/change-entry-test.sh index 60494967..5f4c4127 100644 --- a/.github/tests/change-entry-test.sh +++ b/.github/tests/change-entry-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the target directory path -target_dir="../../it" +target_dir="../it" # Check if the target directory exists if [ ! -d "$target_dir" ]; then diff --git a/.github/tests/restore-entry-test.sh b/.github/tests/restore-entry-test.sh index dcd76876..c8f542db 100644 --- a/.github/tests/restore-entry-test.sh +++ b/.github/tests/restore-entry-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the target directory path -target_dir="../../it" +target_dir="../it" # Check if the target directory exists if [ ! -d "$target_dir" ]; then diff --git a/.github/tests/run-go-test.sh b/.github/tests/run-go-test.sh index 8cd5d7a3..9aeadc08 100644 --- a/.github/tests/run-go-test.sh +++ b/.github/tests/run-go-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the target directory path -target_dir="../../it" +target_dir="../it" # Check if the target directory exists if [ ! -d "$target_dir" ]; then diff --git a/.github/tests/run-mysql-test.sh b/.github/tests/run-mysql-test.sh index 37762c37..09f6427e 100644 --- a/.github/tests/run-mysql-test.sh +++ b/.github/tests/run-mysql-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the target directory path -target_dir="../../it" +target_dir="../it" # Check if the target directory exists if [ ! -d "$target_dir" ]; then diff --git a/.github/tests/run-postgres-test.sh b/.github/tests/run-postgres-test.sh index 8fb0c138..e0f9cc9f 100644 --- a/.github/tests/run-postgres-test.sh +++ b/.github/tests/run-postgres-test.sh @@ -1,7 +1,7 @@ #!/bin/bash # Define the target directory path -target_dir="../../it" +target_dir="../it" # Check if the target directory exists if [ ! -d "$target_dir" ]; then diff --git a/.github/workflows/pr_build.yaml b/.github/workflows/pr_build.yaml index 4b926729..a2de3192 100644 --- a/.github/workflows/pr_build.yaml +++ b/.github/workflows/pr_build.yaml @@ -124,7 +124,7 @@ jobs: - name: Build containers run: ./build.sh shell: bash - working-directory: ./it + working-directory: ./.github/it - name: Run tests run: bash ${{ matrix.tests }} shell: bash