Error following Integration Testing section of mod-search/doc/development.md

Description

I have followed the instructions for integration testing.

Docker-compose up runs successfully (from the Docker folder, not root as per instructions)

All docker containers are created and running successfully under folio-mod-search.

Performing the curl operation:

curl --location --request POST 'http://localhost:8081/_/tenant' \
--header 'Content-Type: application/json' \
--header 'x-okapi-tenant: test' \
--header 'x-okapi-url: http://api-mock:8080' \
--data-raw '{
  "purge": "false"
}'

This fails with the error:

 
{
"errors": [
{
"message": "JDBC exception executing SQL [ [ERROR: relation \"language_config\" does not exist\n Position: 40] [n/a]; SQL [n/a]",
"type": "InvalidDataAccessResourceUsageException",
"code": "unknown_error"
}
],
"total_records": 1
}
 
I can connect to the postgres container and see there are no tables in the created postgres database okapi_modules which would explain this issue.
 
I can't see any other steps to create the required tables.
 
 

Environment

None

Potential Workaround

None

CSP Request Details

None

CSP Rejection Details

None

CSP Approved

None

Checklist

hide

TestRail: Results

Activity

Show:

Viacheslav Kolesnyk October 18, 2023 at 9:28 AM
Edited

Need to update documentation with consortia details, maybe separate file for consortia. Verify non-consortium version works also.

Jonathan P September 12, 2023 at 6:42 AM

having trawled through the project I changed the curl command to use x-okapi-tenant: consortium and that appears to have reached 

log.info("Tenant init has been completed");

in SearchTenantService.afterTenantUpdate which I assume is the desired response; however I'm unsure as it's not documented.

Jonathan P September 12, 2023 at 6:18 AM

Could someone just confirm that following the instructions on this doc/development.md actually works?

I have followed to the letter and it's not working. Is there something else that has to be running to post the tenant?

 

Jonathan P September 8, 2023 at 2:45 AM

Update:

I was incorrect about the database containing no tables.

The okapi_modules database has the following tables under the test_mod_search schema:

consortium_instance
databasechangelog
databasechangeloglock
feature_config
language_config
resource_ids_job

 

The error remains, not sure if something requires further configuration to point to the right schema.

Ann-Marie Breaux September 7, 2023 at 1:49 PM

Hi and There was no dev team on this bug, so I added Spitfire. Please adjust if that is not correct. Thank you!

Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Spitfire

Fix versions

Release

Quesnelia (R1 2024)

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs
Created September 7, 2023 at 8:12 AM
Updated March 19, 2024 at 1:06 PM
Resolved March 19, 2024 at 1:06 PM
TestRail: Cases
TestRail: Runs

Flag notifications