-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automated acceptance tests for cmd_exec API #19413
Add automated acceptance tests for cmd_exec API #19413
Conversation
b280935
to
e448a25
Compare
e1142fb
to
0e6a5a8
Compare
@@ -132,12 +132,11 @@ jobs: | |||
run: | | |||
REM pcap dependencies | |||
powershell -Command "[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} ; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip', 'C:\Windows\Temp\WpdPack_4_1_2.zip')" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dwelch-r7 You mentioned we're adjusting our WpdPack dependency handling.
1645f9d
to
f7fe38d
Compare
f7fe38d
to
5ef3dfd
Compare
I rewrote the original tests we had without having Smashery's changes to test them. Just going to leave the test that covered all the different nuances but needed improved for readability in case something was missed.
|
c99ee49
to
e2d4501
Compare
e2d4501
to
28cdfd6
Compare
@@ -93,6 +93,14 @@ def shell_command_token(cmd, timeout=10) | |||
output | |||
end | |||
|
|||
def to_cmd(cmd, args) | |||
if platform == 'windows' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: I"m not sure if this is the right fix, but if it's passing more tests - then it's definitely putting us more in the right direction 👍
else | ||
output = cmd_exec("echo #{test_string} 1>&2") | ||
output == test_string | ||
end | ||
end | ||
end | ||
|
||
# TODO: These tests are in preparation for Smashery's create process API |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/modules/post/test/cmd_exec.rb
Outdated
@@ -21,21 +21,28 @@ def initialize(info = {}) | |||
) | |||
end | |||
|
|||
def upload_precompiled_binaries | |||
def upload_create_process_precompiled_binaries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not a blocker: def upload_show_args_binary
4c30282
to
0d7166a
Compare
0d7166a
to
cbd763f
Compare
This PR adds acceptance tests for the new
cmd_exec
API changes. More information on these changes can be found in the following PRs:Verification