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: e2e flakiness related to err checking containers #1902

Merged
merged 1 commit into from
Jun 30, 2022
Merged
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
13 changes: 0 additions & 13 deletions tests/e2e/containers/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"fmt"
"os"
"regexp"
"strings"
"testing"
"time"
Expand All @@ -26,8 +25,6 @@ type Manager struct {
valResources map[string][]*dockertest.Resource
}

var errRegex = regexp.MustCompile(`(E|e)rror`)

// NewManager creates a new Manager instance and initializes
// all Docker specific utilies. Returns an error if initialiation fails.
func NewManager(isUpgrade bool, isFork bool) (docker *Manager, err error) {
Expand Down Expand Up @@ -91,16 +88,6 @@ func (m *Manager) ExecCmd(t *testing.T, chainId string, validatorIndex int, comm
return false
}

errBufString := errBuf.String()

// Note that this does not match all errors.
// This only works if CLI outpurs "Error" or "error"
// to stderr.
if errRegex.MatchString(errBufString) {
t.Log(errBufString)
return false
}

if success != "" {
return strings.Contains(outBuf.String(), success) || strings.Contains(errBuf.String(), success)
}
Expand Down