From a949e592352e9baf2143b8402b96cb0c6f9d6dba Mon Sep 17 00:00:00 2001 From: Rohithmatham12 Date: Sat, 18 Jul 2026 14:59:17 -0400 Subject: [PATCH] Use POST for integration add-multiple commands Signed-off-by: Rohithmatham12 --- cortexapps_cli/commands/integrations_commands/apiiro.py | 2 +- cortexapps_cli/commands/integrations_commands/argocd.py | 2 +- cortexapps_cli/commands/integrations_commands/azure_devops.py | 2 +- .../commands/integrations_commands/azure_resources.py | 2 +- cortexapps_cli/commands/integrations_commands/bitbucket.py | 2 +- cortexapps_cli/commands/integrations_commands/circleci.py | 2 +- cortexapps_cli/commands/integrations_commands/coralogix.py | 2 +- cortexapps_cli/commands/integrations_commands/datadog.py | 2 +- cortexapps_cli/commands/integrations_commands/gitlab.py | 2 +- cortexapps_cli/commands/integrations_commands/incidentio.py | 2 +- cortexapps_cli/commands/integrations_commands/jenkins.py | 2 +- cortexapps_cli/commands/integrations_commands/jira.py | 2 +- cortexapps_cli/commands/integrations_commands/launchdarkly.py | 2 +- cortexapps_cli/commands/integrations_commands/pagerduty.py | 2 +- cortexapps_cli/commands/integrations_commands/prometheus.py | 2 +- cortexapps_cli/commands/integrations_commands/rootly.py | 2 +- cortexapps_cli/commands/integrations_commands/semgrep.py | 2 +- cortexapps_cli/commands/integrations_commands/sonarqube.py | 2 +- tests/test_integrations_apiiro.py | 2 +- tests/test_integrations_argocd.py | 2 +- tests/test_integrations_azure_devops.py | 2 +- tests/test_integrations_bitbucket.py | 2 +- tests/test_integrations_circleci.py | 2 +- tests/test_integrations_coralogix.py | 2 +- tests/test_integrations_datadog.py | 2 +- tests/test_integrations_gitlab.py | 2 +- tests/test_integrations_incidentio.py | 2 +- tests/test_integrations_jenkins.py | 2 +- tests/test_integrations_jira.py | 2 +- tests/test_integrations_launchdarkly.py | 2 +- tests/test_integrations_pagerduty.py | 2 +- tests/test_integrations_prometheus.py | 2 +- tests/test_integrations_rootly.py | 2 +- tests/test_integrations_semgrep.py | 2 +- tests/test_integrations_sonarqube.py | 2 +- 35 files changed, 35 insertions(+), 35 deletions(-) diff --git a/cortexapps_cli/commands/integrations_commands/apiiro.py b/cortexapps_cli/commands/integrations_commands/apiiro.py index 48b0207..dff4ef2 100644 --- a/cortexapps_cli/commands/integrations_commands/apiiro.py +++ b/cortexapps_cli/commands/integrations_commands/apiiro.py @@ -49,7 +49,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/apiiro/configurations", data=data) + r = client.post("api/v1/apiiro/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/argocd.py b/cortexapps_cli/commands/integrations_commands/argocd.py index 58801dc..7e26520 100644 --- a/cortexapps_cli/commands/integrations_commands/argocd.py +++ b/cortexapps_cli/commands/integrations_commands/argocd.py @@ -53,7 +53,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/argocd/configurations", data=data) + r = client.post("api/v1/argocd/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/azure_devops.py b/cortexapps_cli/commands/integrations_commands/azure_devops.py index e1936fd..b1d24e5 100644 --- a/cortexapps_cli/commands/integrations_commands/azure_devops.py +++ b/cortexapps_cli/commands/integrations_commands/azure_devops.py @@ -55,7 +55,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/azure-devops/configurations", data=data) + r = client.post("api/v1/azure-devops/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/azure_resources.py b/cortexapps_cli/commands/integrations_commands/azure_resources.py index 38743be..5cb5d30 100644 --- a/cortexapps_cli/commands/integrations_commands/azure_resources.py +++ b/cortexapps_cli/commands/integrations_commands/azure_resources.py @@ -81,7 +81,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/azure-resources/configurations", data=data) + r = client.post("api/v1/azure-resources/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/bitbucket.py b/cortexapps_cli/commands/integrations_commands/bitbucket.py index bf8e619..8e15a60 100644 --- a/cortexapps_cli/commands/integrations_commands/bitbucket.py +++ b/cortexapps_cli/commands/integrations_commands/bitbucket.py @@ -34,7 +34,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/bitbucket/configurations", data=data) + r = client.post("api/v1/bitbucket/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/circleci.py b/cortexapps_cli/commands/integrations_commands/circleci.py index 59ab7ed..4559620 100644 --- a/cortexapps_cli/commands/integrations_commands/circleci.py +++ b/cortexapps_cli/commands/integrations_commands/circleci.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/circleci/configurations", data=data) + r = client.post("api/v1/circleci/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/coralogix.py b/cortexapps_cli/commands/integrations_commands/coralogix.py index 3d42277..76806fd 100644 --- a/cortexapps_cli/commands/integrations_commands/coralogix.py +++ b/cortexapps_cli/commands/integrations_commands/coralogix.py @@ -60,7 +60,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/coralogix/configurations", data=data) + r = client.post("api/v1/coralogix/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/datadog.py b/cortexapps_cli/commands/integrations_commands/datadog.py index d31e87a..42e870d 100644 --- a/cortexapps_cli/commands/integrations_commands/datadog.py +++ b/cortexapps_cli/commands/integrations_commands/datadog.py @@ -59,7 +59,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/datadog/configurations", data=data) + r = client.post("api/v1/datadog/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/gitlab.py b/cortexapps_cli/commands/integrations_commands/gitlab.py index 650a92b..4c8c36f 100644 --- a/cortexapps_cli/commands/integrations_commands/gitlab.py +++ b/cortexapps_cli/commands/integrations_commands/gitlab.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/gitlab/configurations", data=data) + r = client.post("api/v1/gitlab/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/incidentio.py b/cortexapps_cli/commands/integrations_commands/incidentio.py index 6faac76..8f4a262 100644 --- a/cortexapps_cli/commands/integrations_commands/incidentio.py +++ b/cortexapps_cli/commands/integrations_commands/incidentio.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/incidentio/configurations", data=data) + r = client.post("api/v1/incidentio/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/jenkins.py b/cortexapps_cli/commands/integrations_commands/jenkins.py index fa5ddec..2e1a87e 100644 --- a/cortexapps_cli/commands/integrations_commands/jenkins.py +++ b/cortexapps_cli/commands/integrations_commands/jenkins.py @@ -53,7 +53,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/jenkins/configurations", data=data) + r = client.post("api/v1/jenkins/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/jira.py b/cortexapps_cli/commands/integrations_commands/jira.py index ef91741..ad9ed4c 100644 --- a/cortexapps_cli/commands/integrations_commands/jira.py +++ b/cortexapps_cli/commands/integrations_commands/jira.py @@ -34,7 +34,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/jira/configurations", data=data) + r = client.post("api/v1/jira/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/launchdarkly.py b/cortexapps_cli/commands/integrations_commands/launchdarkly.py index f3d9f03..7b06967 100644 --- a/cortexapps_cli/commands/integrations_commands/launchdarkly.py +++ b/cortexapps_cli/commands/integrations_commands/launchdarkly.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/launchdarkly/configurations", data=data) + r = client.post("api/v1/launchdarkly/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/pagerduty.py b/cortexapps_cli/commands/integrations_commands/pagerduty.py index 5b38a92..8279904 100644 --- a/cortexapps_cli/commands/integrations_commands/pagerduty.py +++ b/cortexapps_cli/commands/integrations_commands/pagerduty.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/pagerduty/configurations", data=data) + r = client.post("api/v1/pagerduty/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/prometheus.py b/cortexapps_cli/commands/integrations_commands/prometheus.py index 2934d6e..bc5ac7f 100644 --- a/cortexapps_cli/commands/integrations_commands/prometheus.py +++ b/cortexapps_cli/commands/integrations_commands/prometheus.py @@ -57,7 +57,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/prometheus/configurations", data=data) + r = client.post("api/v1/prometheus/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/rootly.py b/cortexapps_cli/commands/integrations_commands/rootly.py index 84426ac..fce4114 100644 --- a/cortexapps_cli/commands/integrations_commands/rootly.py +++ b/cortexapps_cli/commands/integrations_commands/rootly.py @@ -49,7 +49,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/rootly/configurations", data=data) + r = client.post("api/v1/rootly/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/semgrep.py b/cortexapps_cli/commands/integrations_commands/semgrep.py index 5186f75..c4998ee 100644 --- a/cortexapps_cli/commands/integrations_commands/semgrep.py +++ b/cortexapps_cli/commands/integrations_commands/semgrep.py @@ -53,7 +53,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/semgrep/configurations", data=data) + r = client.post("api/v1/semgrep/configurations", data=data) print_json(data=r) @app.command() diff --git a/cortexapps_cli/commands/integrations_commands/sonarqube.py b/cortexapps_cli/commands/integrations_commands/sonarqube.py index 0de0f3b..6dcac4b 100644 --- a/cortexapps_cli/commands/integrations_commands/sonarqube.py +++ b/cortexapps_cli/commands/integrations_commands/sonarqube.py @@ -51,7 +51,7 @@ def add_multiple( data = json.loads("".join([line for line in file_input])) - r = client.put("api/v1/sonarqube/configurations", data=data) + r = client.post("api/v1/sonarqube/configurations", data=data) print_json(data=r) @app.command() diff --git a/tests/test_integrations_apiiro.py b/tests/test_integrations_apiiro.py index 82270e8..18e9363 100644 --- a/tests/test_integrations_apiiro.py +++ b/tests/test_integrations_apiiro.py @@ -68,5 +68,5 @@ def test_integrations_apiiro_add_file_with_flags_error(tmp_path): def test_integrations_apiiro_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/apiiro/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/apiiro/configurations", json={}, status=200) cli(["integrations", "apiiro", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_argocd.py b/tests/test_integrations_argocd.py index f24fd41..72f44fc 100644 --- a/tests/test_integrations_argocd.py +++ b/tests/test_integrations_argocd.py @@ -68,5 +68,5 @@ def test_integrations_argocd_add_file_with_flags_error(tmp_path): def test_integrations_argocd_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/argocd/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/argocd/configurations", json={}, status=200) cli(["integrations", "argocd", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_azure_devops.py b/tests/test_integrations_azure_devops.py index fd75ddd..ca00e24 100644 --- a/tests/test_integrations_azure_devops.py +++ b/tests/test_integrations_azure_devops.py @@ -68,5 +68,5 @@ def test_integrations_azure_devops_add_file_with_flags_error(tmp_path): def test_integrations_azure_devops_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/azure-devops/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/azure-devops/configurations", json={}, status=200) cli(["integrations", "azure-devops", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_bitbucket.py b/tests/test_integrations_bitbucket.py index 593a89e..6ac94d5 100644 --- a/tests/test_integrations_bitbucket.py +++ b/tests/test_integrations_bitbucket.py @@ -70,5 +70,5 @@ def test_integrations_bitbucket_add_valid(tmp_path): def test_integrations_bitbucket_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/bitbucket/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/bitbucket/configurations", json={}, status=200) cli(["integrations", "bitbucket", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_circleci.py b/tests/test_integrations_circleci.py index ca43299..0243f17 100644 --- a/tests/test_integrations_circleci.py +++ b/tests/test_integrations_circleci.py @@ -68,5 +68,5 @@ def test_integrations_circleci_add_file_with_flags_error(tmp_path): def test_integrations_circleci_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/circleci/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/circleci/configurations", json={}, status=200) cli(["integrations", "circleci", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_coralogix.py b/tests/test_integrations_coralogix.py index 5cc994f..8448340 100644 --- a/tests/test_integrations_coralogix.py +++ b/tests/test_integrations_coralogix.py @@ -68,5 +68,5 @@ def test_integrations_coralogix_add_file_with_flags_error(tmp_path): def test_integrations_coralogix_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/coralogix/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/coralogix/configurations", json={}, status=200) cli(["integrations", "coralogix", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_datadog.py b/tests/test_integrations_datadog.py index dd82d3f..a2d3aaa 100644 --- a/tests/test_integrations_datadog.py +++ b/tests/test_integrations_datadog.py @@ -68,5 +68,5 @@ def test_integrations_datadog_add_file_with_flags_error(tmp_path): def test_integrations_datadog_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/datadog/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/datadog/configurations", json={}, status=200) cli(["integrations", "datadog", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_gitlab.py b/tests/test_integrations_gitlab.py index e0aca41..6515a84 100644 --- a/tests/test_integrations_gitlab.py +++ b/tests/test_integrations_gitlab.py @@ -68,5 +68,5 @@ def test_integrations_gitlab_add_file_with_flags_error(tmp_path): def test_integrations_gitlab_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/gitlab/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/gitlab/configurations", json={}, status=200) cli(["integrations", "gitlab", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_incidentio.py b/tests/test_integrations_incidentio.py index c253b1c..7913556 100644 --- a/tests/test_integrations_incidentio.py +++ b/tests/test_integrations_incidentio.py @@ -68,5 +68,5 @@ def test_integrations_incidentio_add_file_with_flags_error(tmp_path): def test_integrations_incidentio_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/incidentio/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/incidentio/configurations", json={}, status=200) cli(["integrations", "incidentio", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_jenkins.py b/tests/test_integrations_jenkins.py index 7c5ebc1..0bf3f54 100644 --- a/tests/test_integrations_jenkins.py +++ b/tests/test_integrations_jenkins.py @@ -68,5 +68,5 @@ def test_integrations_jenkins_add_file_with_flags_error(tmp_path): def test_integrations_jenkins_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/jenkins/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/jenkins/configurations", json={}, status=200) cli(["integrations", "jenkins", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_jira.py b/tests/test_integrations_jira.py index d3508e0..9b4797f 100644 --- a/tests/test_integrations_jira.py +++ b/tests/test_integrations_jira.py @@ -70,5 +70,5 @@ def test_integrations_jira_add_valid(tmp_path): def test_integrations_jira_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/jira/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/jira/configurations", json={}, status=200) cli(["integrations", "jira", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_launchdarkly.py b/tests/test_integrations_launchdarkly.py index a63544a..d5a0653 100644 --- a/tests/test_integrations_launchdarkly.py +++ b/tests/test_integrations_launchdarkly.py @@ -68,5 +68,5 @@ def test_integrations_launchdarkly_add_file_with_flags_error(tmp_path): def test_integrations_launchdarkly_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/launchdarkly/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/launchdarkly/configurations", json={}, status=200) cli(["integrations", "launchdarkly", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_pagerduty.py b/tests/test_integrations_pagerduty.py index 4a5caf2..8a76882 100644 --- a/tests/test_integrations_pagerduty.py +++ b/tests/test_integrations_pagerduty.py @@ -68,5 +68,5 @@ def test_integrations_pagerduty_add_file_with_flags_error(tmp_path): def test_integrations_pagerduty_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/pagerduty/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/pagerduty/configurations", json={}, status=200) cli(["integrations", "pagerduty", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_prometheus.py b/tests/test_integrations_prometheus.py index 3b6e7e9..774c634 100644 --- a/tests/test_integrations_prometheus.py +++ b/tests/test_integrations_prometheus.py @@ -68,5 +68,5 @@ def test_integrations_prometheus_add_file_with_flags_error(tmp_path): def test_integrations_prometheus_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/prometheus/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/prometheus/configurations", json={}, status=200) cli(["integrations", "prometheus", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_rootly.py b/tests/test_integrations_rootly.py index cb870a1..23c17ae 100644 --- a/tests/test_integrations_rootly.py +++ b/tests/test_integrations_rootly.py @@ -68,5 +68,5 @@ def test_integrations_rootly_add_file_with_flags_error(tmp_path): def test_integrations_rootly_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/rootly/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/rootly/configurations", json={}, status=200) cli(["integrations", "rootly", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_semgrep.py b/tests/test_integrations_semgrep.py index 723091f..a9a9ab7 100644 --- a/tests/test_integrations_semgrep.py +++ b/tests/test_integrations_semgrep.py @@ -68,5 +68,5 @@ def test_integrations_semgrep_add_file_with_flags_error(tmp_path): def test_integrations_semgrep_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/semgrep/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/semgrep/configurations", json={}, status=200) cli(["integrations", "semgrep", "add-multiple", "-f", str(f)]) diff --git a/tests/test_integrations_sonarqube.py b/tests/test_integrations_sonarqube.py index dafd6d4..e96a3e6 100644 --- a/tests/test_integrations_sonarqube.py +++ b/tests/test_integrations_sonarqube.py @@ -90,5 +90,5 @@ def test_integrations_sonarqube_add_file_with_flags_error(tmp_path): def test_integrations_sonarqube_add_multiple_valid(tmp_path): f = tmp_path / "valid.json" f.write_text('{"configurations": []}') - responses.add(responses.PUT, os.getenv("CORTEX_BASE_URL") + "/api/v1/sonarqube/configurations", json={}, status=200) + responses.add(responses.POST, os.getenv("CORTEX_BASE_URL") + "/api/v1/sonarqube/configurations", json={}, status=200) cli(["integrations", "sonarqube", "add-multiple", "-f", str(f)])