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

fix(metadata-test): ensure test setup is successful in creating index… #878

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
13 changes: 8 additions & 5 deletions suites/apis/metadataIngestionTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ BeforeSuite(async ({ I, users, indexd }) => {
`/mds-admin/metadata/${expectedResults.get_dbgap_metadata.testGUIDForPartialMatch}`,
users.indexingAcct.accessTokenHeader,
);

// To test the deletion endpoint, the mds record entry needs to reference an indexd record
// So let us create one
const ok = await indexd.do.addFileIndices(Object.values(files));
expect(ok).to.be.true;
});

AfterSuite(async ({ I }) => {
Expand All @@ -197,6 +192,14 @@ AfterSuite(async ({ I }) => {
}
});

Before(async ({ indexd }) => {
console.log('populating indexd records...');
// To test the deletion endpoint, the mds record entry needs to reference an indexd record
// So let us create one
const ok = await indexd.do.addFileIndices(Object.values(files));
expect(ok).to.be.true;
});

// Scenario #1 - Instrument sower HTTP API endpoint to trigger the ingest-metadata-manifest job
// and check if the expected mds entry is created successfully
Scenario('Dispatch ingest-metadata-manifest sower job with simple tsv and verify metadata ingestion @metadataIngestion', async ({ I, users }) => {
Expand Down