Skip to content

Commit 45ad111

Browse files
vijaykanthmiennae
authored andcommitted
refactor the test file to address comments
1 parent 8132d5b commit 45ad111

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

security-center/snippets/system-test/v2/assetSecurityMarks.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ describe('client with security marks for assets', async () => {
4242
console.log('data %j', data);
4343
});
4444
it('client can add security marks to asset.', () => {
45-
const output = exec(`node v2/addSecurityMarks.js ${data.assetName}`);
45+
const output = execSync(`node v2/addSecurityMarks.js ${data.assetName}`).toString();
4646
assert.include(output, data.assetName);
4747
assert.match(output, /key_a/);
4848
assert.match(output, /value_a/);
@@ -53,9 +53,9 @@ describe('client with security marks for assets', async () => {
5353

5454
it('client can add and delete security marks', () => {
5555
// Ensure marks are set.
56-
exec(`node v2/addSecurityMarks.js ${data.assetName}`);
56+
execSync(`node v2/addSecurityMarks.js ${data.assetName}`).toString();
5757

58-
const output = exec(`node v2/addDeleteSecurityMarks.js ${data.assetName}`);
58+
const output = execSync(`node v2/addDeleteSecurityMarks.js ${data.assetName}`).toString();
5959
assert.match(output, /key_a/);
6060
assert.match(output, /new_value_a/);
6161
assert.notMatch(output, /key_b/);
@@ -64,11 +64,11 @@ describe('client with security marks for assets', async () => {
6464

6565
it('client can delete security marks', () => {
6666
// Ensure marks are set.
67-
exec(`node v2/addSecurityMarks.js ${data.assetName}`);
67+
execSync(`node v2/addSecurityMarks.js ${data.assetName}`).toString();
6868

69-
const output = exec(
69+
const output = execSync(
7070
`node v2/deleteAssetsSecurityMarks.js ${data.assetName}`
71-
);
71+
).toString();
7272
assert.notMatch(output, /key_a/);
7373
assert.notMatch(output, /value_a/);
7474
assert.notMatch(output, /key_b/);

0 commit comments

Comments
 (0)