Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAT-17756: set loadReferenceData: true for linked-data tests #1651

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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' |
Expand All @@ -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' |
Expand Down
2 changes: 1 addition & 1 deletion mod-linked-data/src/main/resources/karate-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ function fn() {
var testTenant = karate.properties['testTenant'];

var config = {
tenantParams: {loadReferenceData: true},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting loadReferenceData: true will initialize all the reference data for the tenant when the tenant is initialized.

So, we do not have to load the authority files and instance types programmatically, as we did earlier.

baseUrl: 'http://localhost:9130',
admin: {tenant: 'diku', name: 'diku_admin', password: 'admin'},
prototypeTenant: 'diku',
Expand All @@ -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'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down