-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runCommand feature + integration tests (#359)
* runCommand test * Added code branch to execute commands without user and sudo, fixed sudo verification and jobdocument validation * refactoring * updated input struct, added unit tests * Addressed comments from previous revision, added another unit test for command contains space * Addressed comments * Added SplitByComma for command * updated README for runCommand, fixed SIGFAULT when command is empty * fixed a typo * added README part asking user not to provide sudo inside command field * addressed comments, changed type of command from console and job doc to string, added a sample doc for runCommand * moved string manipulation functions to StringUtils, added unit tests * Added trimming spaces for command field * fixed a typo in sample job doc * fixed wrong command type in README * added integration tests for runCmd * fixed typo in job doc for integration test * testing * resolved old job doc causing seg fault * removed debug cout
- Loading branch information
1 parent
fc51029
commit 7d3c414
Showing
12 changed files
with
768 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"_comment": "This sample JSON file can be used for creating a new directory newDir at the current filepath.", | ||
"version": "1.0", | ||
"steps": [ | ||
{ | ||
"action": { | ||
"name": "Create New Directory", | ||
"type": "runCommand", | ||
"input": { | ||
"command": "mkdir,newDir" | ||
}, | ||
"runAsUser": "root" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.