Merge branch 'master' into 7490-datamanager-dont-die-return-error
[arvados.git] / sdk / go / arvadostest / run_servers.go
index d20a0959a6bbf078bfc311ddca298d440591f65d..27c552a4e104094ca2ed15991e310a3b7e9cd65e 100644 (file)
@@ -99,19 +99,15 @@ func StopAPI() {
        exec.Command("python", "run_test_server.py", "stop").Run()
 }
 
-// StartKeep starts 2 keep servers with enforcePermissions=false
-func StartKeep() {
-       StartKeepWithParams(2, false)
-}
-
-// StartKeepWithParams starts the given number of keep servers,
+// StartKeep starts the given number of keep servers,
 // optionally with -enforce-permissions enabled.
-func StartKeepWithParams(numKeepServers int, enforcePermissions bool) {
+// Use numKeepServers = 2 and enforcePermissions = false under all normal circumstances.
+func StartKeep(numKeepServers int, enforcePermissions bool) {
        cwd, _ := os.Getwd()
        defer os.Chdir(cwd)
        chdirToPythonTests()
 
-       cmdArgs := []string{"run_test_server.py", "start_keep", "--num-keep-servers", strconv.Itoa(numKeepServers)}
+       cmdArgs := []string{"run_test_server.py", "start_keep", "--num-keep-servers", strconv.Itoa(numKeepServers)}
        if enforcePermissions {
                cmdArgs = append(cmdArgs, "--keep-enforce-permissions")
        }
@@ -128,14 +124,10 @@ func StartKeepWithParams(numKeepServers int, enforcePermissions bool) {
        }
 }
 
-func StopKeep() {
-       StopKeepServers(2)
-}
-
-// StopKeepServers stops keep servers that were started with
-// StartKeep. numkeepServers should be the same value that was passed
-// to StartKeep.
-func StopKeepServers(numKeepServers int) {
+// StopKeep stops keep servers that were started with StartKeep.
+// numkeepServers should be the same value that was passed to StartKeep,
+// which is 2 under all normal circumstances.
+func StopKeep(numKeepServers int) {
        cwd, _ := os.Getwd()
        defer os.Chdir(cwd)
        chdirToPythonTests()