Skip to content

Commit

Permalink
test that openapi job is not added when no openapi config exists
Browse files Browse the repository at this point in the history
  • Loading branch information
ccronca committed Nov 7, 2024
1 parent 63b5e6b commit 493a711
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/scanners/zap/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ def test_setup_no_api_config(test_config):

test_zap.setup()

# openapi job is not added when no openapi config exists
test_config.delete("scanners.zap.apiScan")
test_zap = ZapNone(config=test_config)

test_zap.setup()

for item in test_zap.automation_config["jobs"]:
assert item["type"] != "openapi"

## Testing Authentication methods ##
### Handling Authentication is different depending on the container.type so it'd be better to have test cases separately
Expand Down Expand Up @@ -436,3 +444,4 @@ def test_setup_export_site_tree(test_config, pytestconfig):
assert add_variable_script["parameters"]["name"] == run_variable_script["parameters"]["name"]
assert add_variable_script["parameters"]["inline"]
assert add_variable_script["parameters"]["engine"] == "ECMAScript : Graal.js"

0 comments on commit 493a711

Please sign in to comment.