From f6135ae0e8d96dba57021f4fd244e0f131a3683f Mon Sep 17 00:00:00 2001 From: Daniel Theophanes Date: Sun, 7 Jun 2020 11:39:12 -0700 Subject: [PATCH] service: do not run user service test by default (fails in CI) --- service_test.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/service_test.go b/service_test.go index 6e6086cf..886b0cfb 100644 --- a/service_test.go +++ b/service_test.go @@ -5,6 +5,7 @@ package service_test import ( + "os" "testing" "time" @@ -40,13 +41,18 @@ func TestRunInterrupt(t *testing.T) { } } +const testInstallEnv = "TEST_USER_INSTALL" + // Should always run, without asking for any permission func TestUserRunInterrupt(t *testing.T) { + if os.Getenv(testInstallEnv) != "1" { + t.Skipf("env %q is not set to 1", testInstallEnv) + } p := &program{} options := make(service.KeyValue) options["UserService"] = true sc := &service.Config{ - Name: "go_user_service_test", + Name: "go_user_service_test", Option: options, } s, err := service.New(p, sc)