diff --git a/cli/terminate_signal_test.go b/cli/terminate_signal_test.go index 4813a0ea2..5669f508b 100644 --- a/cli/terminate_signal_test.go +++ b/cli/terminate_signal_test.go @@ -1,26 +1,23 @@ package cli_test import ( - "strings" "syscall" "testing" "github.com/stretchr/testify/require" + "github.com/kopia/kopia/internal/testutil" "github.com/kopia/kopia/tests/testenv" ) -// Waits until the server advertises its address on the line. -func serverStarted(line string) bool { - return !strings.HasPrefix(line, "SERVER ADDRESS: ") -} - func TestTerminate(t *testing.T) { env := testenv.NewCLITest(t, testenv.RepoFormatNotImportant, testenv.NewExeRunner(t)) env.RunAndExpectSuccess(t, "repo", "create", "filesystem", "--path", env.RepoDir) - wait, interrupt := env.RunAndProcessStderrInt(t, serverStarted, "server", "start", + var sp testutil.ServerParameters + + wait, interrupt := env.RunAndProcessStderrInt(t, sp.ProcessOutput, "server", "start", "--address=localhost:0", "--insecure") diff --git a/internal/feature/feature.go b/internal/feature/feature.go index 10f32763d..e17885205 100644 --- a/internal/feature/feature.go +++ b/internal/feature/feature.go @@ -6,9 +6,6 @@ "fmt" ) -// Behavior specifies how kopia should behave if it encounters a Feature it does not understand. -type Behavior string - // IfNotUnderstood describes the behavior of Kopia when a required feature is not understood. type IfNotUnderstood struct { Warn bool `json:"warn"` // warn instead of failing