Refactor parameter serialization into TaskParameterSerializer
parent
90b9835bce
commit
d7e927ec7e
|
|
@ -29,11 +29,11 @@ describe('Cloud Runner', () => {
|
|||
await CloudRunner.run(buildParameter, baseImage.toString());
|
||||
let file = fs.readFileSync(`${CloudRunnerState.buildGuid}-outputfile.txt`, 'utf-8').toString();
|
||||
expect(file).toContain(JSON.stringify(buildParameter));
|
||||
file = file.replace(`\n`, ``).replace(` `, ``);
|
||||
file = file.replace(`\n`, ``);
|
||||
const inputKeys = Object.getOwnPropertyNames(Input);
|
||||
for (const element of inputKeys) {
|
||||
if (Input[element] !== undefined && typeof Input[element] != 'function') {
|
||||
expect(file).toContain(`${element}=${Input[element].toString().replace(`\n`, ``).replace(` `, ``)}`);
|
||||
expect(file).toContain(`${element}=${Input[element].toString().replace(`\n`, ``)}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue