Skip to content

Commit

Permalink
Revert "Test/binary canaries (#5706)"
Browse files Browse the repository at this point in the history
This reverts commit 8a9e0c9.
  • Loading branch information
mildaniel committed Aug 3, 2023
1 parent 1af97d2 commit bc2f386
Show file tree
Hide file tree
Showing 23 changed files with 129 additions and 291 deletions.
132 changes: 0 additions & 132 deletions tests/iac_integration/cdk/test_sam_cdk_integration.py

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def setUp(self):
shutil.copytree(Path(self.terraform_application_path), Path(self.working_dir))

def run_command(self, command_list, env=None, input=None):
process = Popen(command_list, stdout=PIPE, stderr=PIPE, stdin=PIPE, env=env, cwd=self.working_dir, shell=True)
process = Popen(command_list, stdout=PIPE, stderr=PIPE, stdin=PIPE, env=env, cwd=self.working_dir)
try:
(stdout, stderr) = process.communicate(input=input)
return stdout, stderr, process.returncode
Expand Down
45 changes: 10 additions & 35 deletions tests/integration/init/test_init_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ def test_init_command_passes_and_dir_created(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -83,8 +82,7 @@ def test_init_command_passes_and_dir_created_image(self):
"--no-interactive",
"-o",
temp,
],
shell = True,
]
)
try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -115,7 +113,6 @@ def test_init_new_app_template(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -148,7 +145,6 @@ def test_init_command_java_maven(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -181,7 +177,6 @@ def test_init_command_java_gradle(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -214,7 +209,6 @@ def test_init_command_go_provided_image(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -249,7 +243,6 @@ def test_init_command_with_extra_context_parameter(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -284,7 +277,6 @@ def test_init_command_passes_with_arm_architecture(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -319,7 +311,6 @@ def test_init_command_passes_with_x86_64_architecture(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -351,8 +342,7 @@ def test_init_command_passes_with_unknown_architecture(self):
temp,
"--architecture",
"unknown_arch",
],
shell=True,
]
)
capture_output = ""
try:
Expand Down Expand Up @@ -384,8 +374,7 @@ def test_init_command_passes_with_enabled_tracing(self):
"-o",
temp,
"--tracing",
],
shell=True,
]
)
try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -415,8 +404,7 @@ def test_init_command_passes_with_disabled_tracing(self):
"-o",
temp,
"--no-tracing",
],
shell=True,
]
)
try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -446,8 +434,7 @@ def test_init_command_passes_with_enabled_application_insights(self):
"-o",
temp,
"--application-insights",
],
shell=True,
]
)
try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -477,8 +464,7 @@ def test_init_command_passes_with_disabled_application_insights(self):
"-o",
temp,
"--no-application-insights",
],
shell=True,
]
)
try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -538,7 +524,6 @@ def test_init_command_no_interactive_missing_name(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -568,7 +553,6 @@ def test_init_command_no_interactive_apptemplate_location(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -601,7 +585,6 @@ def test_init_command_no_interactive_runtime_location(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -633,7 +616,6 @@ def test_init_command_no_interactive_base_image_location(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -666,7 +648,6 @@ def test_init_command_no_interactive_base_image_no_dependency(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -696,7 +677,6 @@ def test_init_command_no_interactive_packagetype_location(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -727,7 +707,6 @@ def test_init_command_no_interactive_base_image_no_packagetype(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand All @@ -754,7 +733,6 @@ def test_init_command_wrong_packagetype(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -807,7 +785,7 @@ def test_arbitrary_project(self, project_name):
if project_name:
args.extend(["--name", project_name])

process = Popen(args, shell=True,)
process = Popen(args)
try:
process.communicate(timeout=TIMEOUT)
except TimeoutExpired:
Expand All @@ -823,7 +801,7 @@ def test_zip_not_exists(self):
with tempfile.TemporaryDirectory() as temp:
args = [get_sam_command(), "init", "--location", str(Path("invalid", "zip", "path")), "-o", temp]

process = Popen(args, shell=True,)
process = Popen(args)
try:
process.communicate(timeout=TIMEOUT)
except TimeoutExpired:
Expand All @@ -847,7 +825,7 @@ def test_location_with_no_interactive_and_name(self):
"-o",
tmp,
]
process = Popen(args, shell=True,)
process = Popen(args)

try:
process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -959,7 +937,6 @@ def _run_init(self, cwd):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -1000,7 +977,6 @@ def test_zip_template_config(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -1036,7 +1012,6 @@ def test_image_template_config(self):
],
stdout=PIPE,
stderr=PIPE,
shell=True,
)
try:
stdout_data, stderr_data = process.communicate(timeout=TIMEOUT)
Expand Down Expand Up @@ -1097,7 +1072,7 @@ class TestInitCommand(InitIntegBase):
def test_graceful_exit(self):
# Run the Base Command
command_list = self.get_command()
process_execute = Popen(command_list, stdout=PIPE, stderr=PIPE, shell=True,)
process_execute = Popen(command_list, stdout=PIPE, stderr=PIPE)

# Wait for binary to be ready before sending interrupts.
time.sleep(self.BINARY_READY_WAIT_TIME)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/local/generate_event/test_cli_integ.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

class Test_EventGeneration_Integ(TestCase):
def test_generate_event_substitution(self):
process = Popen([get_sam_command(), "local", "generate-event", "s3", "put"], shell=True,)
process = Popen([get_sam_command(), "local", "generate-event", "s3", "put"])
process.communicate()
self.assertEqual(process.returncode, 0)
Loading

0 comments on commit bc2f386

Please sign in to comment.