From fce318e71c4d11fc9a75726293c9b13628c8d0ec Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Sun, 2 Aug 2020 20:29:46 +0200 Subject: [PATCH 1/2] Enable SpringerFetcherTest running on CI using a dedicated key --- .github/workflows/tests-fetchers.yml | 2 +- .../jabref/logic/importer/fetcher/SpringerFetcherTest.java | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/tests-fetchers.yml b/.github/workflows/tests-fetchers.yml index 9d30f9c7864..b4933acb25e 100644 --- a/.github/workflows/tests-fetchers.yml +++ b/.github/workflows/tests-fetchers.yml @@ -22,7 +22,7 @@ on: - cron: '2 3 * * 3' env: - SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }} + SpringerNatureAPIKey: ${{ secrets.SPRINGERNATUREAPIKEY_FOR_TESTS }} AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey }} IEEEAPIKey: ${{ secrets.IEEEAPIKey }} diff --git a/src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java b/src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java index ee1d3a76c4d..cb4d188e5e0 100644 --- a/src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java +++ b/src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java @@ -7,7 +7,6 @@ import org.jabref.model.entry.BibEntry; import org.jabref.model.entry.field.StandardField; import org.jabref.model.entry.types.StandardEntryType; -import org.jabref.support.DisabledOnCIServer; import org.jabref.testutils.category.FetcherTest; import kong.unirest.json.JSONObject; @@ -26,7 +25,6 @@ void setUp() { fetcher = new SpringerFetcher(); } - @DisabledOnCIServer("Disable on CI Server to not hit the API call limit") @Test void searchByQueryFindsEntry() throws Exception { BibEntry expected = new BibEntry(StandardEntryType.Article); @@ -49,7 +47,6 @@ void searchByQueryFindsEntry() throws Exception { assertEquals(Collections.singletonList(expected), fetchedEntries); } - @DisabledOnCIServer("Disable on CI Server to not hit the API call limit") @Test void testSpringerJSONToBibtex() { String jsonString = "{\r\n" + " \"identifier\":\"doi:10.1007/BF01201962\",\r\n" @@ -73,7 +70,6 @@ void testSpringerJSONToBibtex() { assertEquals(Optional.of("1992-09-01"), bibEntry.getField(StandardField.DATE)); } - @DisabledOnCIServer("Disable on CI Server to not hit the API call limit") @Test void searchByEmptyQueryFindsNothing() throws Exception { assertEquals(Collections.emptyList(), fetcher.performSearch("")); From a3e209a907e63fe2ae145be7780089545931cffe Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 4 Aug 2020 23:37:15 +0200 Subject: [PATCH 2/2] Add more CI/CD keys --- .github/workflows/tests-fetchers.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-fetchers.yml b/.github/workflows/tests-fetchers.yml index b4933acb25e..0aa59c10dca 100644 --- a/.github/workflows/tests-fetchers.yml +++ b/.github/workflows/tests-fetchers.yml @@ -23,8 +23,8 @@ on: env: SpringerNatureAPIKey: ${{ secrets.SPRINGERNATUREAPIKEY_FOR_TESTS }} - AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey }} - IEEEAPIKey: ${{ secrets.IEEEAPIKey }} + AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey_FOR_TESTS }} + IEEEAPIKey: ${{ secrets.IEEEAPIKey_FOR_TESTS }} jobs: fetchertests: