Skip to content

Commit

Permalink
update workflows and tests
Browse files Browse the repository at this point in the history
Signed-off-by: Emily Rodriguez <[email protected]>
  • Loading branch information
Emily Rodriguez committed Apr 20, 2023
1 parent 6a4490d commit f5855f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/burpsuite2hdf.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
on: [push]
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
heimdall_tools_conversion:
runs-on: ubuntu-latest
Expand Down
9 changes: 4 additions & 5 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
const path = require('path');
const saf_action = require('../index.js');
const saf_action = require('../run_command.js');

describe('SAF Action tests', () => {
it('should run SAF with a space topic separator in the command string', async () => {
let inputFilePath = path.resolve('./test/sample_data/red_hat_good.json');
process.env['INPUT_COMMAND_STRING'] = `view summary -i ${inputFilePath}`;
require('../index.js');
await saf_action();
await saf_action({safCLIPath: "./node_modules/@mitre/saf/lib/index.js"});
delete process.env['INPUT_COMMAND_STRING'];
});
it('should run SAF with a semicolon topic separator in the command string', async () => {
it('should run SAF with a colon topic separator in the command string', async () => {
let inputFilePath = path.resolve('./test/sample_data/red_hat_good.json');
process.env['INPUT_COMMAND_STRING'] = `view:summary -i ${inputFilePath}`;
await saf_action();
await saf_action({safCLIPath: "./node_modules/@mitre/saf/lib/index.js"});
delete process.env['INPUT_COMMAND_STRING'];
});
});

0 comments on commit f5855f3

Please sign in to comment.