Преглед на файлове

fixed message in unit test

AETH-erial преди 10 месеца
родител
ревизия
9824750878
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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)
 			go startTestSever(tc[i].ListenPort[x], t)
 		}
 		}
 		got := PortWalk("localhost", tc[i].ScanPort)
 		got := PortWalk("localhost", tc[i].ScanPort)
-		for k, _ := range tc[i].ListenPort {
+		for k := range tc[i].ListenPort {
 			wg.Done()
 			wg.Done()
 			if !Equal(got, tc[i].ListenPort) {
 			if !Equal(got, tc[i].ListenPort) {
 				if !tc[i].ShouldFail {
 				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.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])
 
 
 		}
 		}