Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
sidhujus committed Apr 26, 2024
1 parent 27f35de commit b48abcf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/unit/workflows/rust_cargo/test_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,29 @@ def which(cmd, executable_search_paths):

def test_release_build_cargo_command_for_provided_al2(self):
cargo = BinaryPath(None, None, None, binary_path="path/to/cargo")
action = RustCargoLambdaBuildAction("source_dir", {"cargo": cargo}, None, "provided.al2", self.subprocess_cargo_lambda)
action = RustCargoLambdaBuildAction(
"source_dir", {"cargo": cargo}, None, "provided.al2", self.subprocess_cargo_lambda
)
self.assertEqual(
action.build_command(),
["path/to/cargo", "lambda", "build", "--release", "--target", "x86_64-unknown-linux-gnu.2.26"],
)

def test_release_build_cargo_command_for_provided_al2_arm64(self):
cargo = BinaryPath(None, None, None, binary_path="path/to/cargo")
action = RustCargoLambdaBuildAction("source_dir", {"cargo": cargo}, None, "provided.al2", self.subprocess_cargo_lambda, "arm64")
action = RustCargoLambdaBuildAction(
"source_dir", {"cargo": cargo}, None, "provided.al2", self.subprocess_cargo_lambda, "arm64"
)
self.assertEqual(
action.build_command(),
["path/to/cargo", "lambda", "build", "--release", "--target", "aarch64-unknown-linux-gnu.2.26"],
)

def test_release_build_cargo_command_for_provided_al2023(self):
cargo = BinaryPath(None, None, None, binary_path="path/to/cargo")
action = RustCargoLambdaBuildAction("source_dir", {"cargo": cargo}, None, "provided.al2023", self.subprocess_cargo_lambda)
action = RustCargoLambdaBuildAction(
"source_dir", {"cargo": cargo}, None, "provided.al2023", self.subprocess_cargo_lambda
)
self.assertEqual(
action.build_command(),
["path/to/cargo", "lambda", "build", "--release"],
Expand Down

0 comments on commit b48abcf

Please sign in to comment.