mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	Add k8s tags to related tests (#1018)
, so that `make test` will pass by default. Also fixed several ineffassign and golint issues. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This commit is contained in:
		| @@ -5,7 +5,7 @@ import ( | ||||
| 	"testing" | ||||
| ) | ||||
|  | ||||
| func sendOneTcp(tcp *TCP) error { | ||||
| func sendOneTCP(tcp *TCP) error { | ||||
| 	if _, err := tcp.Write([]byte("frame")); err != nil { | ||||
| 		return err | ||||
| 	} | ||||
| @@ -14,10 +14,10 @@ func sendOneTcp(tcp *TCP) error { | ||||
| 	} | ||||
| 	return nil | ||||
| } | ||||
| func TestTcp(t *testing.T) { | ||||
| func TestTCP(t *testing.T) { | ||||
| 	tcp := NewTCP("localhost:14000") | ||||
|  | ||||
| 	if err := sendOneTcp(tcp); err == nil { | ||||
| 	if err := sendOneTCP(tcp); err == nil { | ||||
| 		t.Fatal("Not listening but no error.") | ||||
| 		return | ||||
| 	} | ||||
| @@ -34,7 +34,7 @@ func TestTcp(t *testing.T) { | ||||
| 		wait <- true | ||||
| 	}() | ||||
|  | ||||
| 	if err := sendOneTcp(tcp); err != nil { | ||||
| 	if err := sendOneTCP(tcp); err != nil { | ||||
| 		t.Fatalf("send one: %s", err) | ||||
| 		return | ||||
| 	} | ||||
| @@ -44,7 +44,7 @@ func TestTcp(t *testing.T) { | ||||
| 	// TODO: When the server isn't responding according to the framestream protocol | ||||
| 	// the thread is blocked. | ||||
| 	/* | ||||
| 		if err := sendOneTcp(tcp); err == nil { | ||||
| 		if err := sendOneTCP(tcp); err == nil { | ||||
| 			panic("must fail") | ||||
| 		} | ||||
| 	*/ | ||||
| @@ -54,7 +54,7 @@ func TestTcp(t *testing.T) { | ||||
| 		wait <- true | ||||
| 	}() | ||||
|  | ||||
| 	if err := sendOneTcp(tcp); err != nil { | ||||
| 	if err := sendOneTCP(tcp); err != nil { | ||||
| 		t.Fatalf("send one: %s", err) | ||||
| 		return | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user