A shepherd for your Appimages.
0

Configure Feed

Select the types of activity you want to include in your feed.

test/systemd: check full generated unit

Aly Raffauf (Jun 19, 2026, 1:17 PM EDT) c13caea7 051a57ad

+8 -14
+8 -14
cmd/appherder/systemd_test.go
··· 1 1 package main 2 2 3 3 import ( 4 - "strings" 5 4 "testing" 6 5 7 6 "github.com/alyraffauf/appherder/internal/appherder" ··· 14 13 "/tmp/App Images/%apps/.icons", 15 14 "/tmp/bin dir", 16 15 ) 17 - template := strings.Join([]string{ 18 - "ExecStart={{BIN}} sync", 19 - "PathChanged={{APPIMAGES_DIR}}", 20 - "ReadWritePaths={{READ_WRITE_PATHS}}", 21 - }, "\n") 16 + template := "ExecStart={{BIN}} sync\n" + 17 + "PathChanged={{APPIMAGES_DIR}}\n" + 18 + "ReadWritePaths={{READ_WRITE_PATHS}}" 22 19 23 20 got, err := renderUnitTemplate(template, "/opt/app%herder", app) 24 21 if err != nil { 25 22 t.Fatalf("renderUnitTemplate: %v", err) 26 23 } 27 24 28 - for _, want := range []string{ 29 - "ExecStart=/opt/app%%herder sync", 30 - `PathChanged="/tmp/App Images/%%apps"`, 31 - `ReadWritePaths="/tmp/App Images/%%apps" /tmp/data/applications "/tmp/bin dir"`, 32 - } { 33 - if !strings.Contains(got, want) { 34 - t.Fatalf("rendered unit missing %q:\n%s", want, got) 35 - } 25 + want := "ExecStart=/opt/app%%herder sync\n" + 26 + `PathChanged="/tmp/App Images/%%apps"` + "\n" + 27 + `ReadWritePaths="/tmp/App Images/%%apps" /tmp/data/applications "/tmp/bin dir"` 28 + if got != want { 29 + t.Fatalf("rendered unit = %q, want %q", got, want) 36 30 } 37 31 } 38 32