fix(test): update log assertions for debug logging and field expansion
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -319,8 +319,8 @@ func TestClusterHandler_GetNodes_Success_NoLogs(t *testing.T) {
|
||||
t.Fatalf("expected 200, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 0 {
|
||||
t.Fatalf("expected 0 log entries on success, got %d", recorded.Len())
|
||||
if recorded.Len() != 2 {
|
||||
t.Fatalf("expected 2 log entries on success, got %d", recorded.Len())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -370,10 +370,10 @@ func TestClusterHandler_GetNode_NotFound_LogsWarn(t *testing.T) {
|
||||
t.Fatalf("expected 404, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 1 {
|
||||
t.Fatalf("expected 1 log entry, got %d", recorded.Len())
|
||||
if recorded.Len() != 3 {
|
||||
t.Fatalf("expected 3 log entries, got %d", recorded.Len())
|
||||
}
|
||||
entry := recorded.All()[0]
|
||||
entry := recorded.All()[2]
|
||||
if entry.Level != zapcore.WarnLevel {
|
||||
t.Fatalf("expected Warn level, got %v", entry.Level)
|
||||
}
|
||||
@@ -405,8 +405,8 @@ func TestClusterHandler_GetNode_Success_NoLogs(t *testing.T) {
|
||||
t.Fatalf("expected 200, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 0 {
|
||||
t.Fatalf("expected 0 log entries on success, got %d", recorded.Len())
|
||||
if recorded.Len() != 2 {
|
||||
t.Fatalf("expected 2 log entries on success, got %d", recorded.Len())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -458,8 +458,8 @@ func TestClusterHandler_GetPartitions_Success_NoLogs(t *testing.T) {
|
||||
t.Fatalf("expected 200, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 0 {
|
||||
t.Fatalf("expected 0 log entries on success, got %d", recorded.Len())
|
||||
if recorded.Len() != 2 {
|
||||
t.Fatalf("expected 2 log entries on success, got %d", recorded.Len())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -509,10 +509,10 @@ func TestClusterHandler_GetPartition_NotFound_LogsWarn(t *testing.T) {
|
||||
t.Fatalf("expected 404, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 1 {
|
||||
t.Fatalf("expected 1 log entry, got %d", recorded.Len())
|
||||
if recorded.Len() != 3 {
|
||||
t.Fatalf("expected 3 log entries, got %d", recorded.Len())
|
||||
}
|
||||
entry := recorded.All()[0]
|
||||
entry := recorded.All()[2]
|
||||
if entry.Level != zapcore.WarnLevel {
|
||||
t.Fatalf("expected Warn level, got %v", entry.Level)
|
||||
}
|
||||
@@ -559,8 +559,8 @@ func TestClusterHandler_GetPartition_Success_NoLogs(t *testing.T) {
|
||||
t.Fatalf("expected 200, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 0 {
|
||||
t.Fatalf("expected 0 log entries on success, got %d", recorded.Len())
|
||||
if recorded.Len() != 2 {
|
||||
t.Fatalf("expected 2 log entries on success, got %d", recorded.Len())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -617,8 +617,8 @@ func TestClusterHandler_GetDiag_Success_NoLogs(t *testing.T) {
|
||||
t.Fatalf("expected 200, got %d", w.Code)
|
||||
}
|
||||
|
||||
if recorded.Len() != 0 {
|
||||
t.Fatalf("expected 0 log entries on success, got %d", recorded.Len())
|
||||
if recorded.Len() != 2 {
|
||||
t.Fatalf("expected 2 log entries on success, got %d", recorded.Len())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user