working prototype for NYQL api tests#737
Conversation
danamansana
left a comment
There was a problem hiding this comment.
This looks like a great start!
samanthaandrews
left a comment
There was a problem hiding this comment.
Agree with Daniel that this is good to merge as is, just a few general comments and questions from me
|
|
||
| testCases.forEach(({ name, nyql, advanced }) => { | ||
| it(`should match results for ${name}`, async () => { | ||
| const baseUrl = "https://qa-platform.nypl.org/api/v0.1"; |
There was a problem hiding this comment.
In the future, we will probably want to pull this out into an environment variable, e.g., process.env.API_BASE_URL, so that we can switch it out with the locally running version more easily
There was a problem hiding this comment.
We spoke about this in our 1:1, but since there are a lot of changes to this file, it's probably a good idea to run it by the team and get the endpoint running locally just to make sure we didn't accidentally introduce any other breaking changes
| "deploy-production": "git checkout production && git pull origin qa && eb deploy discovery-api-production --profile nypl-digital-dev", | ||
| "rebuild-annotated-marc-rules": "./scripts/update-annotated-marc-rules.js --refetch" | ||
| "rebuild-annotated-marc-rules": "./scripts/update-annotated-marc-rules.js --refetch", | ||
| "api-test": "npx mocha test/integration/nyql-api.test.js --exit" |
| ]; | ||
|
|
||
| describe("Discovery API - NYQL vs Advanced Search equivalence", function () { | ||
| this.timeout(30000); |
There was a problem hiding this comment.
curious to know about this timeout vs the two that are happening within each request. i'm guessing this one is a timeout for the full describe block but the other two are timeouts for those requests explicitly. my question is what happens if we don't add any timeouts at all? not sure what the best practice is here tbh so i'm looking for your thoughts!
Adds api tests for NYQL. Please note that this is an initial prototype and contains a lot of console.log statements for debugging. These will eventually be removed.