mirror of
https://github.com/grafana/grafana.git
synced 2026-08-26 21:37:31 -05:00
Alerting: Allow remote Alertmanager integration tests to fail (#88664)
* Alerting: Allow remote Alertmanager integration tests to fail * format drone * rebase from main * the wait-for container needs canFail more than the acutal integration-tests container --------- Co-authored-by: Charandas Batra <charandas.batra@grafana.com>
This commit is contained in:
co-authored by
Charandas Batra
parent
e061f2886f
commit
aaf23c64c3
@@ -218,8 +218,8 @@ def validate_openapi_spec_step():
|
||||
],
|
||||
}
|
||||
|
||||
def dockerize_step(name, hostname, port):
|
||||
return {
|
||||
def dockerize_step(name, hostname, port, canFail = False):
|
||||
step = {
|
||||
"name": name,
|
||||
"image": images["dockerize"],
|
||||
"commands": [
|
||||
@@ -227,6 +227,11 @@ def dockerize_step(name, hostname, port):
|
||||
],
|
||||
}
|
||||
|
||||
if canFail:
|
||||
step["failure"] = "ignore"
|
||||
|
||||
return step
|
||||
|
||||
def build_storybook_step(ver_mode):
|
||||
return {
|
||||
"name": "build-storybook",
|
||||
@@ -959,7 +964,7 @@ def publish_images_step(ver_mode, docker_repo, trigger = None):
|
||||
|
||||
return step
|
||||
|
||||
def integration_tests_steps(name, cmds, hostname = None, port = None, environment = None):
|
||||
def integration_tests_steps(name, cmds, hostname = None, port = None, environment = None, canFail = False):
|
||||
"""Integration test steps
|
||||
|
||||
Args:
|
||||
@@ -968,6 +973,7 @@ def integration_tests_steps(name, cmds, hostname = None, port = None, environmen
|
||||
hostname: the hostname where the remote server is available.
|
||||
port: the port where the remote server is available.
|
||||
environment: Any extra environment variables needed to run the integration tests.
|
||||
canFail: controls whether the step can fail.
|
||||
|
||||
Returns:
|
||||
A list of drone steps. If a hostname / port were provided, then a step to wait for the remove server to be
|
||||
@@ -988,6 +994,9 @@ def integration_tests_steps(name, cmds, hostname = None, port = None, environmen
|
||||
] + cmds,
|
||||
}
|
||||
|
||||
if canFail:
|
||||
step["failure"] = "ignore"
|
||||
|
||||
if environment:
|
||||
step["environment"] = environment
|
||||
|
||||
@@ -1064,7 +1073,7 @@ def remote_alertmanager_integration_tests_steps():
|
||||
"AM_URL": "http://mimir_backend:8080",
|
||||
}
|
||||
|
||||
return integration_tests_steps("remote-alertmanager", cmds, "mimir_backend", "8080", environment = environment)
|
||||
return integration_tests_steps("remote-alertmanager", cmds, "mimir_backend", "8080", environment = environment, canFail = True)
|
||||
|
||||
def memcached_integration_tests_steps():
|
||||
cmds = [
|
||||
|
||||
Reference in New Issue
Block a user