Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Nov 10, 2022
1 parent a27604a commit 5c7dad2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 33 deletions.
40 changes: 9 additions & 31 deletions helm/botkube/e2e-test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,7 @@ communications:
- kubectl-allow-all
sources:
- k8s-events
'secondary':
name: "" # Tests will override this temporarily
notification:
disabled: true
bindings:
executors:
- kubectl-read-only
sources:
- k8s-updates
socketSlack: # Configuration for the Slack app with Socket Mode support
enabled: false # Tests will override this temporarily
botToken: "" # Provide a botToken for custom slack app
appToken: "" # Provide an appToken for custom slack app
channels:
'default':
name: "" # Tests will override this temporarily
bindings:
executors:
- kubectl-read-only
- kubectl-wait-cmd
- kubectl-exec-cmd
- kubectl-allow-all
sources:
- k8s-events
- k8s-pod-create-events
'secondary':
name: "" # Tests will override this temporarily
notification:
Expand All @@ -65,6 +42,7 @@ communications:
- kubectl-allow-all
sources:
- k8s-events
- k8s-pod-create-events
'secondary':
id: "" # Tests will override this channel ID temporarily
notification:
Expand All @@ -83,20 +61,20 @@ sources:
namespaces:
include:
- botkube
recommendations:
pod:
noLatestImageTag: true
labelsSet: true
ingress:
backendServiceValid: false
tlsSecretValid: false
events:
- create
- update
- delete
resources:
- name: v1/configmaps
'k8s-pod-create-events':
recommendations:
pod:
noLatestImageTag: true
labelsSet: true
ingress:
backendServiceValid: false
tlsSecretValid: false
kubernetes:
namespaces:
include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ settings:
port: 0
deployment: {}
log:
level: info
level: error
disableColors: false
informersResyncPeriod: 30m0s
kubeconfig: kubeconfig-from-env
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/slack_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ func (s *slackTester) WaitForMessagePostedWithAttachment(userID, channelID strin
var fetchedMessages []slack.Message
var lastErr error
var diffMessage string
highestCommonBlockCount := -1 // a single message is fetched, always print diff
var highestCommonBlockCount int
if limitMessages == 1 {
highestCommonBlockCount = -1 // a single message is fetched, always print diff
}

err := wait.Poll(pollInterval, s.cfg.MessageWaitTimeout, func() (done bool, err error) {
historyRes, err := s.cli.GetConversationHistory(&slack.GetConversationHistoryParameters{
Expand Down

0 comments on commit 5c7dad2

Please sign in to comment.