mirror of
https://github.com/prymitive/karma
synced 2026-09-04 11:27:19 +00:00
fix(test): use correct alertmanager option format in tests
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user