Skip to content

Commit

Permalink
Merge pull request #75 from em-c-rod/testPullRequest
Browse files Browse the repository at this point in the history
update workflows and tests
  • Loading branch information
em-c-rod authored Apr 21, 2023
2 parents eae4590 + de7bb2c commit ed382f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 7 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 All @@ -17,6 +21,8 @@ jobs:
# with:
# file: 'sample/burpsuite_sample.min'
# converter: 'burpsuite_mapper'
- name: Get GitHub Action Path
run: echo "GITHUB_ACTION_PATH is - ${{ toJSON(github) }}"
- name: Convert Burpsuite
uses: em-c-rod/saf_action_test@master
with:
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 ed382f3

Please sign in to comment.