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
7 changes: 6 additions & 1 deletion suites/apis/metadataIngestionTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Scenario('Dispatch partial match get-dbgap-metadata job with mock dbgap xml and
}).retry(1);

// Scenario #4 - Instrument the metadata-service DELETE endpoint
Scenario('create a new mds entry and then issue http delete against mds/objects/{guid} @metadataIngestion', async ({ I, users }) => {
Scenario('create a new mds entry and then issue http delete against mds/objects/{guid} @metadataIngestion', async ({ I, users, indexd }) => {
// create a local small file to upload to test bucket.
const uploadTmpFile = await bash.runCommand(`
echo "hello mds" > mds-test.file && aws s3 cp ./mds-test.file s3://cdis-presigned-url-test/mds-test.file
Expand All @@ -317,6 +317,11 @@ Scenario('create a new mds entry and then issue http delete against mds/objects/
console.log(`uploadTmpFile: ${uploadTmpFile}`);
}

// To test the 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;

const guidToBeDeleted = files.allowed.did;

const createMdsEntryReq = await I.sendPostRequest(
Expand Down