From abd14bb079700911f49dd5a755180f4c4e3171a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Tue, 1 Jan 2019 22:22:15 +0000 Subject: [PATCH] fix(test): use correct alertmanager option format in tests --- ui/src/Components/SilenceModal/SilenceForm.test.js | 4 +--- ui/src/Stores/SilenceFormStore.test.js | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ui/src/Components/SilenceModal/SilenceForm.test.js b/ui/src/Components/SilenceModal/SilenceForm.test.js index 1927b6a50..ca7cbc67c 100644 --- a/ui/src/Components/SilenceModal/SilenceForm.test.js +++ b/ui/src/Components/SilenceModal/SilenceForm.test.js @@ -167,9 +167,7 @@ describe("", () => { matcher.name = "job"; matcher.values = [{ label: "node_exporter", value: "node_exporter" }]; silenceFormStore.data.matchers = [matcher]; - silenceFormStore.data.alertmanagers = [ - { label: "am1", value: "http://example.com" } - ]; + silenceFormStore.data.alertmanagers = [{ label: "am1", value: ["am1"] }]; silenceFormStore.data.author = "me@example.com"; silenceFormStore.data.comment = "fake silence"; const tree = ShallowSilenceForm(); diff --git a/ui/src/Stores/SilenceFormStore.test.js b/ui/src/Stores/SilenceFormStore.test.js index ea1b52e15..44b9195bc 100644 --- a/ui/src/Stores/SilenceFormStore.test.js +++ b/ui/src/Stores/SilenceFormStore.test.js @@ -31,7 +31,7 @@ const MockGroup = () => { const MockAlertmanagerOption = () => ({ label: "default", - value: "http://localhost" + value: ["default"] }); const MockMatcher = (name, values) => { @@ -209,7 +209,7 @@ describe("SilenceFormStore.data", () => { expect(store.data.alertmanagers).toHaveLength(1); expect(store.data.alertmanagers[0]).toMatchObject({ label: alertmanager.name, - value: alertmanager.publicURI + value: [alertmanager.name] }); expect(store.data.matchers).toHaveLength(2);