@getjones/test-infra 4.2.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
const env = require('../../../../env');
|
|
2
|
-
const { internalAPI } = require('../../../../../../../packages/test-infra')(env);
|
|
3
2
|
const FormData = require('form-data');
|
|
4
3
|
const fs = require('fs');
|
|
5
4
|
const path = require('path');
|
|
6
|
-
const { auth } = internalAPI;
|
|
7
5
|
const uploadFileApi = require('../../../internal-api/uploadFiles/api/upload.file.api');
|
|
8
6
|
const agreementAPI = require('./agreement.api');
|
|
9
7
|
const { CreateAgreementByPMModel } = require('../models/createAgreementByPMModel');
|
|
@@ -85,10 +83,10 @@ const uploadAgreementByPM = async (
|
|
|
85
83
|
|
|
86
84
|
const uploadAgreementByAuditor = async (
|
|
87
85
|
recordId,
|
|
86
|
+
context,
|
|
88
87
|
filePath = `${COI_FOLDER_PATH}${DEFAULT_COI_FILENAME}`
|
|
89
88
|
) => {
|
|
90
|
-
const
|
|
91
|
-
const { data: { preSignedUrl, fileName: fullFilePath } } = await getAgreementPreSignedUrl(recordId, auditorContext, { filePath });
|
|
89
|
+
const { data: { preSignedUrl, fileName: fullFilePath } } = await getAgreementPreSignedUrl(recordId, context, { filePath });
|
|
92
90
|
|
|
93
91
|
const uploadResults = await uploadAgreementToTempBucket(preSignedUrl, filePath);
|
|
94
92
|
validateResponse(uploadResults, recordId);
|
|
@@ -97,7 +95,7 @@ const uploadAgreementByAuditor = async (
|
|
|
97
95
|
contractorId: recordId, fileName: fullFilePath
|
|
98
96
|
});
|
|
99
97
|
|
|
100
|
-
const createResponse = await createAgreementByAuditor(createAgreementModel,
|
|
98
|
+
const createResponse = await createAgreementByAuditor(createAgreementModel, context);
|
|
101
99
|
|
|
102
100
|
if (createResponse.status !== httpResponseStatusCodes.OK) {
|
|
103
101
|
throw new Error(`Failed to upload agreement for record ${recordId}`);
|
|
Binary file
|