Skip to content

Commit

Permalink
Merge pull request #19060 from ghouscht/ignore-missing-err-confstate
Browse files Browse the repository at this point in the history
fix(e2e): ignore error log about failed storage update
  • Loading branch information
ahrtr authored Dec 15, 2024
2 parents c75703d + 07fd512 commit 9ab8c23
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
37 changes: 31 additions & 6 deletions tests/e2e/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,25 @@ func TestNoErrorLogsDuringNormalOperations(t *testing.T) {
e2e.WithClusterSize(1),
e2e.WithLogLevel("debug"),
},
allowedErrors: map[string]bool{"setting up serving from embedded etcd failed.": true},
allowedErrors: map[string]bool{
"setting up serving from embedded etcd failed.": true,
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800
// TODO: Remove with etcd 3.7
"cannot detect storage schema version: missing confstate information": true,
},
},
{
name: "three node cluster",
options: []e2e.EPClusterOption{
e2e.WithClusterSize(3),
e2e.WithLogLevel("debug"),
},
allowedErrors: map[string]bool{"setting up serving from embedded etcd failed.": true},
allowedErrors: map[string]bool{
"setting up serving from embedded etcd failed.": true,
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800
// TODO: Remove with etcd 3.7
"cannot detect storage schema version: missing confstate information": true,
},
},
{
name: "three node cluster with auto tls (all)",
Expand All @@ -57,7 +67,12 @@ func TestNoErrorLogsDuringNormalOperations(t *testing.T) {
e2e.WithClientAutoTLS(true),
e2e.WithClientConnType(e2e.ClientTLS),
},
allowedErrors: map[string]bool{"setting up serving from embedded etcd failed.": true},
allowedErrors: map[string]bool{
"setting up serving from embedded etcd failed.": true,
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800
// TODO: Remove with etcd 3.7
"cannot detect storage schema version: missing confstate information": true,
},
},
{
name: "three node cluster with auto tls (peers)",
Expand All @@ -67,7 +82,12 @@ func TestNoErrorLogsDuringNormalOperations(t *testing.T) {
e2e.WithIsPeerTLS(true),
e2e.WithIsPeerAutoTLS(true),
},
allowedErrors: map[string]bool{"setting up serving from embedded etcd failed.": true},
allowedErrors: map[string]bool{
"setting up serving from embedded etcd failed.": true,
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800
// TODO: Remove with etcd 3.7
"cannot detect storage schema version: missing confstate information": true,
},
},
{
name: "three node cluster with auto tls (client)",
Expand All @@ -77,7 +97,12 @@ func TestNoErrorLogsDuringNormalOperations(t *testing.T) {
e2e.WithClientAutoTLS(true),
e2e.WithClientConnType(e2e.ClientTLS),
},
allowedErrors: map[string]bool{"setting up serving from embedded etcd failed.": true},
allowedErrors: map[string]bool{
"setting up serving from embedded etcd failed.": true,
// See https://github.com/etcd-io/etcd/pull/19040#issuecomment-2539173800
// TODO: Remove with etcd 3.7
"cannot detect storage schema version: missing confstate information": true,
},
},
}

Expand Down Expand Up @@ -114,7 +139,7 @@ func TestNoErrorLogsDuringNormalOperations(t *testing.T) {
err := json.Unmarshal([]byte(line), &entry)
require.NoErrorf(t, err, "parse log line as json, line: %s", line)

if tc.allowedErrors[entry.Message] {
if tc.allowedErrors[entry.Message] || tc.allowedErrors[entry.Error] {
continue
}

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/zap_logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ type logEntry struct {
Timestamp string `json:"ts"`
Caller string `json:"caller"`
Message string `json:"msg"`
Error string `json:"error"`
}

func TestConnectionRejectMessage(t *testing.T) {
Expand Down

0 comments on commit 9ab8c23

Please sign in to comment.