From 77f632ca9339cf849cb5298a1d7c53e42178c77c 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 ---------- .../features/util/crud-resource.feature | 7 ------- .../mod-linked-data/linked-data-junit.feature | 2 -- .../src/main/resources/karate-config.js | 2 +- .../org/folio/CreateResourceSimulation.scala | 3 --- .../java/org/folio/ModLinkedDataTest.java | 1 - 8 files changed, 1 insertion(+), 48 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/citation/mod-linked-data/features/util/crud-resource.feature b/mod-linked-data/src/main/resources/citation/mod-linked-data/features/util/crud-resource.feature index 29116c53c..f0db874e4 100644 --- a/mod-linked-data/src/main/resources/citation/mod-linked-data/features/util/crud-resource.feature +++ b/mod-linked-data/src/main/resources/citation/mod-linked-data/features/util/crud-resource.feature @@ -75,13 +75,6 @@ Feature: CRUD operations on a resource When method put Then status 204 - @postAuthorityFile - Scenario: Post an authority file - Given path 'authority-source-files' - And request authorityFileRequest - When method POST - Then status 201 - @getSourceRecordFormatted Scenario: Get a source record Given path 'source-storage/records/' + inventoryId + '/formatted' diff --git a/mod-linked-data/src/main/resources/citation/mod-linked-data/linked-data-junit.feature b/mod-linked-data/src/main/resources/citation/mod-linked-data/linked-data-junit.feature index ad3a673a7..e62f2c424 100644 --- a/mod-linked-data/src/main/resources/citation/mod-linked-data/linked-data-junit.feature +++ b/mod-linked-data/src/main/resources/citation/mod-linked-data/linked-data-junit.feature @@ -37,7 +37,6 @@ Feature: mod-linked-data integration tests | 'inventory-storage.instances.item.post' | | 'inventory-storage.instances.item.get' | | 'inventory-storage.instances.item.put' | - | 'inventory-storage.instance-types.item.post' | | 'inventory-storage.instances.item.delete' | | 'inventory-storage.preceding-succeeding-titles.collection.get' | | 'inventory-storage.preceding-succeeding-titles.item.get' | @@ -49,7 +48,6 @@ Feature: mod-linked-data integration tests | 'source-storage.records.formatted.item.get' | | 'marc-records-editor.item.post' | | 'marc-records-editor.item.put' | - | 'inventory-storage.authority-source-files.item.post' | | 'browse.authorities.collection.get' | | 'source-storage.records.formatted.item.get' | | 'specification-storage.specifications.collection.get' | diff --git a/mod-linked-data/src/main/resources/karate-config.js b/mod-linked-data/src/main/resources/karate-config.js index cf754042b..336c877aa 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', @@ -33,7 +34,6 @@ function fn() { searchLinkedDataWork: karate.read('classpath:citation/mod-linked-data/features/util/search-resource.feature@searchLinkedDataWork'), searchInventoryInstance: karate.read('classpath:citation/mod-linked-data/features/util/search-resource.feature@searchInventoryInstance'), searchAuthority: karate.read('classpath:citation/mod-linked-data/features/util/search-resource.feature@searchAuthority'), - postAuthorityFile: karate.read('classpath:citation/mod-linked-data/features/util/crud-resource.feature@postAuthorityFile'), getSourceRecordFormatted: karate.read('classpath:citation/mod-linked-data/features/util/crud-resource.feature@getSourceRecordFormatted'), getResourceGraph: karate.read('classpath:citation/mod-linked-data/features/util/crud-resource.feature@getResourceGraph'), getResourceSupportCheck: karate.read('classpath:citation/mod-linked-data/features/util/crud-resource.feature@getResourceSupportCheck'), 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"); }