From c0b2a00da00eda658150fce0a3e3582e87701486 Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:00:53 -0800 Subject: [PATCH 1/2] prevent set value from bleeding into other specs --- .github/workflows/build-test-lint.yaml | 2 +- spec/lib/bulkrax/bulkrax_decorator_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index ce0c2ec5c..71e809f57 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -48,7 +48,7 @@ jobs: uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.23 with: confdir: "/app/samvera/hyrax-webapp/solr/conf" - rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" + rspec_cmd: "gem install semaphore_test_boosters && bundle && TB_RSPEC_OPTIONS='--seed=14318' rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" reports: if: always() diff --git a/spec/lib/bulkrax/bulkrax_decorator_spec.rb b/spec/lib/bulkrax/bulkrax_decorator_spec.rb index 3aea219c4..2922894be 100644 --- a/spec/lib/bulkrax/bulkrax_decorator_spec.rb +++ b/spec/lib/bulkrax/bulkrax_decorator_spec.rb @@ -27,6 +27,12 @@ allow(Site.account).to receive(:bulkrax_field_mappings).and_return nil end + around do |example| + initialized_defaults = Hyku.default_bulkrax_field_mappings + example.run + Hyku.default_bulkrax_field_mappings = initialized_defaults + end + it "returns Hyku's default field mappings" do Hyku.default_bulkrax_field_mappings = { this: 'is fine' } From cda7724b08d4b81482e4a58ca952414e5f5cbf24 Mon Sep 17 00:00:00 2001 From: Benjamin Kiah Stroud <32469930+bkiahstroud@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:20:09 -0800 Subject: [PATCH 2/2] remove testing debug ENV var from CI --- .github/workflows/build-test-lint.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-lint.yaml b/.github/workflows/build-test-lint.yaml index 71e809f57..ce0c2ec5c 100644 --- a/.github/workflows/build-test-lint.yaml +++ b/.github/workflows/build-test-lint.yaml @@ -48,7 +48,7 @@ jobs: uses: scientist-softserv/actions/.github/workflows/test.yaml@v0.0.23 with: confdir: "/app/samvera/hyrax-webapp/solr/conf" - rspec_cmd: "gem install semaphore_test_boosters && bundle && TB_RSPEC_OPTIONS='--seed=14318' rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" + rspec_cmd: "gem install semaphore_test_boosters && bundle && rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL" reports: if: always()