Browse Source

Fix: test run command (#463)

Kslr 5 years ago
parent
commit
d1eafe2b4c
2 changed files with 2 additions and 2 deletions
  1. 1 1
      testing/scenarios/common_coverage.go
  2. 1 1
      testing/scenarios/common_regular.go

+ 1 - 1
testing/scenarios/common_coverage.go

@@ -28,7 +28,7 @@ func RunV2RayProtobuf(config []byte) *exec.Cmd {
 	os.MkdirAll(covDir, os.ModeDir)
 	randomID := uuid.New()
 	profile := randomID.String() + ".out"
-	proc := exec.Command(testBinaryPath, "-config=stdin:", "-format=pb", "-test.run", "TestRunMainForCoverage", "-test.coverprofile", profile, "-test.outputdir", covDir)
+	proc := exec.Command(testBinaryPath, "run", "-config=stdin:", "-format=pb", "-test.run", "TestRunMainForCoverage", "-test.coverprofile", profile, "-test.outputdir", covDir)
 	proc.Stdin = bytes.NewBuffer(config)
 	proc.Stderr = os.Stderr
 	proc.Stdout = os.Stdout

+ 1 - 1
testing/scenarios/common_regular.go

@@ -23,7 +23,7 @@ func BuildV2Ray() error {
 
 func RunV2RayProtobuf(config []byte) *exec.Cmd {
 	genTestBinaryPath()
-	proc := exec.Command(testBinaryPath, "-config=stdin:", "-format=pb")
+	proc := exec.Command(testBinaryPath, "run", "-config=stdin:", "-format=pb")
 	proc.Stdin = bytes.NewBuffer(config)
 	proc.Stderr = os.Stderr
 	proc.Stdout = os.Stdout