Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialised filters and minor issues #173

Merged
merged 1 commit into from
Sep 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions test/e2e/command/botkube.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ func (c *context) testBotkubeCommand(t *testing.T) {
},
"BotKube filters list": {
command: "filters list",
expected: "FILTER ENABLED DESCRIPTION\n" +
"IngressValidator true Checks if services and tls secrets used in ingress specs are available.\n" +
"JobStatusChecker true Sends notifications only when job succeeds and ignores other job update events.\n" +
"NodeEventsChecker true Sends notifications on node level critical events.\n" +
"PodLabelChecker true Checks and adds recommedations if labels are missing in the pod specs.\n" +
"ImageTagChecker true Checks and adds recommendation if 'latest' image tag is used for container image.\n",
expected: "FILTER ENABLED DESCRIPTION\n" +
"NamespaceChecker true Checks if event belongs to blocklisted namespaces and filter them.\n" +
"NodeEventsChecker true Sends notifications on node level critical events.\n" +
"ObjectAnnotationChecker true Checks if annotations botkube.io/* present in object specs and filters them.\n" +
"PodLabelChecker true Checks and adds recommedations if labels are missing in the pod specs.\n" +
"ImageTagChecker true Checks and adds recommendation if 'latest' image tag is used for container image.\n" +
"IngressValidator true Checks if services and tls secrets used in ingress specs are available.\n" +
"JobStatusChecker true Sends notifications only when job succeeds and ignores other job update events.\n",
},
}

Expand Down
1 change: 0 additions & 1 deletion test/e2e/notifier/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func (c *context) testCreateResource(t *testing.T) {
err := json.Unmarshal([]byte(lastSeenMsg), &m)
assert.NoError(t, err, "message should decode properly")
assert.Equal(t, c.Config.Communications.Slack.Channel, m.Channel)
assert.Equal(t, c.Config.Communications.Slack.Channel, m.Channel)
assert.Equal(t, test.Expected.Attachments, m.Attachments)
isAllowed := utils.AllowedEventKindsMap[utils.EventKind{Resource: test.Kind, Namespace: "all", EventType: config.CreateEvent}] ||
utils.AllowedEventKindsMap[utils.EventKind{Resource: test.Kind, Namespace: test.Namespace, EventType: config.CreateEvent}]
Expand Down