From 07c2be3943a75ef323dcf3a9d8fca9d98e143812 Mon Sep 17 00:00:00 2001 From: PK Jacob Date: Mon, 23 Dec 2024 13:40:35 -0500 Subject: [PATCH] FAT-17756: set loadReferenceData: true for linked-data tests --- .../mod-linked-data/create-ref-data.feature | 21 ------------------- .../authority/authority-update.feature | 2 -- .../samples/authority_source_file.json | 11 ---------- .../src/main/resources/karate-config.js | 1 + .../org/folio/CreateResourceSimulation.scala | 3 --- .../java/org/folio/ModLinkedDataTest.java | 1 - 6 files changed, 1 insertion(+), 38 deletions(-) delete mode 100644 mod-linked-data/src/main/resources/citation/mod-linked-data/create-ref-data.feature delete mode 100644 mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/samples/authority_source_file.json diff --git a/mod-linked-data/src/main/resources/citation/mod-linked-data/create-ref-data.feature b/mod-linked-data/src/main/resources/citation/mod-linked-data/create-ref-data.feature deleted file mode 100644 index 35b394e21..000000000 --- a/mod-linked-data/src/main/resources/citation/mod-linked-data/create-ref-data.feature +++ /dev/null @@ -1,21 +0,0 @@ -Feature: Create refrerence data - - Background: - * url baseUrl - * callonce login testUser - * def testUserHeaders = { 'Content-Type': 'application/json', 'x-okapi-token': '#(okapitoken)', 'Accept': '*/*' } - * configure headers = testUserHeaders - - Scenario: create Instance Type referenece data - Given path 'instance-types' - And request - """ - { - "id": "526aa04d-9289-4511-8866-349299592c18", - "name": "cartographic image", - "code": "cri", - "source": "rdacontent" - } - """ - When method post - Then status 201 \ No newline at end of file diff --git a/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/authority-update.feature b/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/authority-update.feature index d90009ea4..e855307c1 100644 --- a/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/authority-update.feature +++ b/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/authority-update.feature @@ -5,8 +5,6 @@ Feature: Authority update * callonce login testUser * def testUserHeaders = { 'Content-Type': 'application/json', 'x-okapi-token': '#(okapitoken)', 'Accept': '*/*' } * configure headers = testUserHeaders - * def authorityFileRequest = read('samples/authority_source_file.json') - * call postAuthorityFile Scenario: create authority and work, then update authority # Step 1: create an authority diff --git a/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/samples/authority_source_file.json b/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/samples/authority_source_file.json deleted file mode 100644 index 4e26cb922..000000000 --- a/mod-linked-data/src/main/resources/citation/mod-linked-data/features/authority/samples/authority_source_file.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "id": "af045f2f-e851-4613-984c-4bc13430454a", - "name": "LC Name Authority file (LCNAF)", - "code": "abcdefghijklmnopqrstuvwxy", - "type": "Names", - "baseUrl": "http://id.loc.gov/authorities/names/", - "selectable": true, - "hridManagement": { - "startNumber": 1 - } -} \ No newline at end of file diff --git a/mod-linked-data/src/main/resources/karate-config.js b/mod-linked-data/src/main/resources/karate-config.js index cf754042b..5fda0af6d 100644 --- a/mod-linked-data/src/main/resources/karate-config.js +++ b/mod-linked-data/src/main/resources/karate-config.js @@ -12,6 +12,7 @@ function fn() { var testTenant = karate.properties['testTenant']; var config = { + tenantParams: {loadReferenceData: true}, baseUrl: 'http://localhost:9130', admin: {tenant: 'diku', name: 'diku_admin', password: 'admin'}, prototypeTenant: 'diku', diff --git a/mod-linked-data/src/test/java/org/folio/CreateResourceSimulation.scala b/mod-linked-data/src/test/java/org/folio/CreateResourceSimulation.scala index 38a1e0d21..f62843b7b 100644 --- a/mod-linked-data/src/test/java/org/folio/CreateResourceSimulation.scala +++ b/mod-linked-data/src/test/java/org/folio/CreateResourceSimulation.scala @@ -26,8 +26,6 @@ class CreateResourceSimulation extends Simulation { val before = scenario("before") .exec(karateFeature("classpath:citation/mod-linked-data/linked-data-junit.feature")) - val createRefData = scenario("createRefData") - .exec(karateFeature("classpath:citation/mod-linked-data/create-ref-data.feature")) val createResource = scenario("createResource") .repeat(10) { exec(karateFeature("classpath:citation/mod-linked-data/features/create-bib-api/create-resource.feature")) @@ -36,7 +34,6 @@ class CreateResourceSimulation extends Simulation { setUp( before.inject(atOnceUsers(1)) - .andThen(createRefData.inject(atOnceUsers(1))) .andThen(createResource.inject(nothingFor(3 seconds), rampUsers(3) during (5 seconds))) .andThen(after.inject(nothingFor(3 seconds), atOnceUsers(1))), ).protocols(protocol) diff --git a/mod-linked-data/src/test/java/org/folio/ModLinkedDataTest.java b/mod-linked-data/src/test/java/org/folio/ModLinkedDataTest.java index d177fbc4d..2a4bb46f1 100644 --- a/mod-linked-data/src/test/java/org/folio/ModLinkedDataTest.java +++ b/mod-linked-data/src/test/java/org/folio/ModLinkedDataTest.java @@ -23,7 +23,6 @@ public ModLinkedDataTest() { @BeforeAll public void setup() { runFeature("classpath:citation/mod-linked-data/linked-data-junit.feature"); - runFeature("classpath:citation/mod-linked-data/create-ref-data.feature"); runFeature("classpath:citation/mod-linked-data/restart-mod-search-kafka-listeners.feature"); }