fix(test): use correct alertmanager option format in tests

This commit is contained in:
Łukasz Mierzwa
2019-01-01 23:02:29 +00:00
parent 8c80f74487
commit abd14bb079
2 changed files with 3 additions and 5 deletions
@@ -167,9 +167,7 @@ describe("<SilenceForm />", () => {
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();
+2 -2
View File
@@ -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);