Skip to content

Commit

Permalink
hwaccel: change log test (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggordaniRed authored Jul 22, 2024
1 parent e97dbc1 commit 6cba716
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/hw-accel/nfd/features/tests/features-test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,15 @@ var _ = Describe("NFD", Ordered, func() {
glog.V(ts.LogLevel).Info("retrieve logs from %v", p.Object.Name)
log, err := get.PodLogs(APIClient, hwaccelparams.NFDNamespace, p.Object.Name)
Expect(err).NotTo(HaveOccurred(), "Error retrieving pod logs.")

Expect(len(log)).NotTo(Equal(0))
for _, errorKeyword := range errorKeywords {
if strings.Contains(log, "read /host-sys/class/net/ens5/speed") {
Skip("known error")
}

Expect(log).ShouldNot(ContainSubstring(errorKeyword))
logLines := strings.Split(log, "\n")
for _, line := range logLines {
if strings.Contains(errorKeyword, line) {
glog.Error("error found in log:", line)
}
}

}

Expand Down

0 comments on commit 6cba716

Please sign in to comment.