fc2c62f5f5ede4c352609f081623f296bd83c555

Author
Ayman Bagabas <ayman.bagabas@gmail.com>
Committer
Ayman Bagabas <ayman.bagabas@gmail.com>
Date

Message

fix(daemon): timeout test

Diff

 1diff --git a/pkg/daemon/daemon_test.go b/pkg/daemon/daemon_test.go
 2index 40e0e102535de2dccc7008b1a505eaac5b605971..7ebe31b5358b7e5de7813cec41ca4cbdf790734b 100644
 3--- a/pkg/daemon/daemon_test.go
 4+++ b/pkg/daemon/daemon_test.go
 5@@ -1,10 +1,8 @@
 6 package daemon
 7 
 8 import (
 9-	"bytes"
10 	"context"
11 	"fmt"
12-	"io"
13 	"log"
14 	"net"
15 	"os"
16@@ -101,11 +99,7 @@ func TestInvalidRepo(t *testing.T) {
17 }
18 
19 func readPktline(c net.Conn) (string, error) {
20-	buf, err := io.ReadAll(c)
21-	if err != nil {
22-		return "", err
23-	}
24-	pktout := pktline.NewScanner(bytes.NewReader(buf))
25+	pktout := pktline.NewScanner(c)
26 	if !pktout.Scan() {
27 		return "", pktout.Err()
28 	}