File: test-containerized.patch

package info (click to toggle)
golang-github-kardianos-service 1.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 300 kB
  • sloc: makefile: 40; sh: 3
file content (17 lines) | stat: -rw-r--r-- 751 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1070412

Index: golang-github-kardianos-service-1.2.1/name_test.go
===================================================================
--- golang-github-kardianos-service-1.2.1.orig/name_test.go
+++ golang-github-kardianos-service-1.2.1/name_test.go
@@ -14,7 +14,9 @@ func TestPlatformName(t *testing.T) {
 	got := Platform()
 	t.Logf("Platform is %v", got)
 	wantPrefix := runtime.GOOS + "-"
-	if !strings.HasPrefix(got, wantPrefix) {
+	// in containers, it will report unix-systemv
+	wantPrefixContainer := "unix-systemv"
+	if !strings.HasPrefix(got, wantPrefix) && !strings.HasPrefix(got, wantPrefixContainer) {
 		t.Errorf("Platform() want: /^%s.*$/, got: %s", wantPrefix, got)
 	}
 }