Skip to content

Commit

Permalink
Fixes #10 - better command line options for generate-terraform command
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcquade committed Mar 12, 2021
1 parent 313a5bb commit c8c9f01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/command/test_generate_terraform.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ def test_generate_terraform_command_with_click(self):
"""command.generate_terraform: should return exit code 0"""
result = self.runner.invoke(generate_terraform, ["--help"])
self.assertTrue(result.exit_code == 0)
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example"])
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example", "--no-params"])
print(result.output)
self.assertTrue(result.exit_code == 0)

def test_generate_terraform_command_with_config(self):
"""command.generate_terraform: with config file"""
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example", "--config-file", default_config_file])
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example", "--no-params", "--config-file", default_config_file])
self.assertTrue(result.exit_code == 0)
# print(result.output)

def test_generate_terraform_with_explicit_matches(self):
"""command.generate_terraform: with config file that matches keywords"""
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example", "--config-file", config_with_keyword_matches])
result = self.runner.invoke(generate_terraform, ["--service", "all", "--subscription", "example", "--no-params", "--config-file", config_with_keyword_matches])
# print(result.output)
# We know for sure that no policies that match "customer-managed key" will also
# contain "private link" in it (which is what the config file above looks for)
Expand Down

0 comments on commit c8c9f01

Please sign in to comment.