Skip to content

Commit

Permalink
fix: close log file
Browse files Browse the repository at this point in the history
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
  • Loading branch information
testwill committed Apr 18, 2024
1 parent d973fad commit baa61f2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/integration/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ func SearchK3sLog(k3s *K3sServer, target string) (bool, error) {
if err != nil {
return false, err
}
defer file.Close()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
if strings.Contains(scanner.Text(), target) {
Expand Down

0 comments on commit baa61f2

Please sign in to comment.