Skip to content

Commit

Permalink
service: do not run user service test by default (fails in CI)
Browse files Browse the repository at this point in the history
  • Loading branch information
kardianos committed Jun 7, 2020
1 parent ec63d01 commit f6135ae
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
package service_test

import (
"os"
"testing"
"time"

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit f6135ae

Please sign in to comment.