Skip to content

Commit

Permalink
Merge pull request #1255 from datacite/fix-ci-test-clearing
Browse files Browse the repository at this point in the history
Make sure we clear the index before we reindex
  • Loading branch information
jrhoads authored Sep 27, 2024
2 parents cc2bf06 + f85d05c commit 1134b45
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions spec/requests/datacite_dois/datacite_dois_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ def clear_doi_index
@dois = DataciteDoi.query(nil, page: { cursor: [], size: 10 }).results.to_a
end

after do
end

it "returns dois" do
get "/dois", nil, headers

Expand Down Expand Up @@ -249,9 +246,6 @@ def clear_doi_index
import_doi_index
end

after do
end

it "returns nil publisher when publisher param is not set" do
get "/dois", nil, headers

Expand All @@ -277,11 +271,8 @@ def clear_doi_index
let!(:doi) { create(:doi, client: client, publisher: nil) }

before do
import_doi_index
end

after do
clear_doi_index
import_doi_index
end

it "returns nil publisher when publisher param is not set" do
Expand Down Expand Up @@ -313,10 +304,8 @@ def clear_doi_index
}

before do
import_doi_index
end
after do
clear_doi_index
import_doi_index
end

it "returns publisher hashes when publisher param is set to true" do
Expand Down Expand Up @@ -493,11 +482,8 @@ def clear_doi_index
let!(:study_registration_doi) { create(:doi, client: client, aasm_state: "findable", types: { "resourceTypeGeneral": "StudyRegistration" }) }

before do
import_doi_index
end

after do
clear_doi_index
import_doi_index
end

it "filters for Instrument dois when resource-type-id is set to instrument", vcr: true do
Expand Down

0 comments on commit 1134b45

Please sign in to comment.