From de50fe9d8b6699c818986964fb318ad3ef9699e4 Mon Sep 17 00:00:00 2001 From: kentsanggds <ken.tsang@digital.cabinet-office.gov.uk> Date: Tue, 13 Aug 2024 15:27:55 +0100 Subject: [PATCH 1/2] Add test-environment.sh to setup test env vars --- test-environment.sh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 test-environment.sh diff --git a/test-environment.sh b/test-environment.sh new file mode 100755 index 00000000..c9ac2950 --- /dev/null +++ b/test-environment.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# source this script before running tests to set the correct env vars +export RAILS_ENV=test +export ES_INDEX=datasets-test +export CKAN_DOMAIN=testdomain From d26f3783f28fae512ff763cedd3b951ccd273fdb Mon Sep 17 00:00:00 2001 From: kentsanggds <ken.tsang@digital.cabinet-office.gov.uk> Date: Wed, 14 Aug 2024 11:42:59 +0100 Subject: [PATCH 2/2] Remove redundant docker scripts --- bin/setup-docker-test.sh | 16 ---------------- bin/setup-docker.sh | 8 -------- 2 files changed, 24 deletions(-) delete mode 100755 bin/setup-docker-test.sh delete mode 100755 bin/setup-docker.sh diff --git a/bin/setup-docker-test.sh b/bin/setup-docker-test.sh deleted file mode 100755 index 6de8c810..00000000 --- a/bin/setup-docker-test.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -# source this script before running tests in docker ckan to set the correct env vars -export RAILS_ENV=test -export ES_INDEX=datasets-test -export CKAN_DOMAIN=testdomain - -# install chrome for tests -wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -dpkg -i google-chrome-stable_current_amd64.deb -apt-get install -y ./google-chrome-stable_current_amd64.deb -apt --fix-broken install -y -wget https://chromedriver.storage.googleapis.com/113.0.5672.63/chromedriver_linux64.zip -unzip chromedriver_linux64.zip -mv chromedriver /usr/bin/chromedriver -chown root:root /usr/bin/chromedriver -chmod +x /usr/bin/chromedriver diff --git a/bin/setup-docker.sh b/bin/setup-docker.sh deleted file mode 100755 index 279d5157..00000000 --- a/bin/setup-docker.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# This setup script is used with the docker-ckan dev stack - -echo '===== Setup datagovuk find =====' - -mkdir -p /var/log/find -rm -rf /srv/app/datagovuk_find/tmp/pids/ -rails s -b 0.0.0.0 2>&1 | tee /var/log/find/find.log