Skip to content

Commit

Permalink
Remove invalid test case from specs
Browse files Browse the repository at this point in the history
  • Loading branch information
zzaakiirr committed Dec 10, 2024
1 parent 485c4b6 commit 398d3cc
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions spec/command/terraform/import_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,6 @@ def stub_terraform_init_with(success, output)
end
end

context "with special characters in resource address and resource id" do
let(:resource_address) { "cpln_gvc.test-app;rm -rf /" }
let(:resource_id) { "test-app;rm -rf /" }

it "is protected from shell injection" do
terraform_import

expect(Shell).to have_received(:cmd).with(
"terraform", "import", resource_address, "test-app;rm -rf /",
capture_stderr: true
)

expect(Shell).to have_received(:info).with(/Invalid character/)
end
end

def stub_terraform_import_with(success, output)
allow(Shell).to receive(:cmd)
.with("terraform", "import", resource_address, resource_id, capture_stderr: true)
Expand Down

0 comments on commit 398d3cc

Please sign in to comment.