diff --git a/.github/workflows/rspec.yml b/.github/workflows/rspec.yml index a63869936..003edf50a 100644 --- a/.github/workflows/rspec.yml +++ b/.github/workflows/rspec.yml @@ -65,6 +65,7 @@ jobs: env: RAILS_ENV: test GOVUK_CONTENT_SCHEMAS_PATH: vendor/publishing-api/content_schemas + GOVUK_HELM_CHARTS_PATH: vendor/govuk-helm-charts TEST_DATABASE_URL: ${{ steps.setup-postgres.outputs.db-url }} run: bundle exec rake spec diff --git a/spec/db/scrub_access_limited_spec.rb b/spec/db/scrub_access_limited_spec.rb index 76f610233..949bc4801 100644 --- a/spec/db/scrub_access_limited_spec.rb +++ b/spec/db/scrub_access_limited_spec.rb @@ -1,6 +1,7 @@ RSpec.describe "Scrub Access Limited SQL Script" do def execute_sql - sql = File.read(Rails.root.join("vendor/govuk-helm-charts/charts/db-backup/scripts/content-publisher.sql")) + helm_charts_path = ENV.fetch("GOVUK_HELM_CHARTS_PATH", "../govuk-helm-charts") + sql = File.read(Rails.root.join("#{helm_charts_path}/charts/db-backup/scripts/content-publisher.sql")) ActiveRecord::Base.connection.execute(sql) end