Browse Source

fixed message in unit test

AETH-erial 10 months ago
parent
commit
9824750878
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pkg/scanner_test.go

+ 2 - 2
pkg/scanner_test.go

@@ -89,14 +89,14 @@ func TestPortWalk(t *testing.T) {
 			go startTestSever(tc[i].ListenPort[x], t)
 		}
 		got := PortWalk("localhost", tc[i].ScanPort)
-		for k, _ := range tc[i].ListenPort {
+		for k := range tc[i].ListenPort {
 			wg.Done()
 			if !Equal(got, tc[i].ListenPort) {
 				if !tc[i].ShouldFail {
 					t.Errorf("Test '%s' failed! PortWalk didnt detect the test server was listening on: %+v\n", tc[i].Name, tc[i].ListenPort)
 				}
 			}
-			t.Logf("Test '%s' passed! Scanned port: '%v'", tc[i].Name, k)
+			t.Logf("Test '%s' passed! Scanned port: '%v'", tc[i].Name, tc[i].ListenPort[k])
 
 		}