Skip to content

Commit

Permalink
Add Tester reset functionality
Browse files Browse the repository at this point in the history
* As per purpleteam-labs/purpleteam#88
* Re-work orchestrator.js as per:
  purpleteam-labs/purpleteam#87
  • Loading branch information
binarymist committed Sep 15, 2021
1 parent dcf9d21 commit 7df0746
Show file tree
Hide file tree
Showing 12 changed files with 466 additions and 263 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ module.exports = {
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'object-curly-newline': ['error', { multiline: true }],
'no-multiple-empty-lines': ['error', { max: 2, maxBOF: 0, maxEOF: 1 }],
'newline-per-chained-call': 'off'
'newline-per-chained-call': 'off',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }]
},
env: { node: true },
parserOptions: { ecmaVersion: 2021 },
Expand Down
14 changes: 7 additions & 7 deletions config/config.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
"level": "debug"
},
"host": {
"host": "172.25.0.110"
"host": "orchestrator"
},
"testers": {
"app": {
"url": "http://172.25.0.120:3000",
"url": "http://app-scanner:3000",
"active": true
},
"server": {
"url": "http://172.25.0.130:3010",
"url": "http://server-scanner:3010",
"active": false
},
"tls": {
"url": "http://172.25.0.140:3020",
"url": "http://tls-scanner:3020",
"active": true
}
},
"outcomes": {
"dir": "/var/log/purpleteam/outcomes/"
},
"testerFeedbackComms": {
"medium": "lp"
},
"coolDown": {
"timeout": 50000
}
}
16 changes: 13 additions & 3 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,8 @@ const schema = {
},
testPlanRoute: '/test-plan',
initTesterRoute: '/init-tester',
startTesterRoute: '/start-tester'
startTesterRoute: '/start-tester',
resetTesterRoute: '/reset-tester'
},
server: {
name: 'server',
Expand All @@ -110,7 +111,8 @@ const schema = {
},
testPlanRoute: '/test-plan',
initTesterRoute: '/init-tester',
startTesterRoute: '/start-tester'
startTesterRoute: '/start-tester',
resetTesterRoute: '/reset-tester'
},
tls: {
name: 'tls',
Expand All @@ -126,7 +128,8 @@ const schema = {
},
testPlanRoute: '/test-plan',
initTesterRoute: '/init-tester',
startTesterRoute: '/start-tester'
startTesterRoute: '/start-tester',
resetTesterRoute: '/reset-tester'
}
},
job: {
Expand Down Expand Up @@ -166,6 +169,13 @@ const schema = {
default: 20.0
}
}
},
coolDown: {
timeout: {
doc: 'The duration in milliseconds between Test Runs before another test command can be initiated. Important to make sure cleanup has occurred before starting another Test Run. In the cloud ECS requires a longer cool-down period before restarting S2 Tasks.',
format: 'duration',
default: 10000
}
}
};

Expand Down
Loading

0 comments on commit 7df0746

Please sign in to comment.