Skip to content

Commit d85954b

Browse files
committed
tests(integration): add check for systemd unit file droppings
1 parent 31e9f36 commit d85954b

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

tests/ps_test.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
package tests
44

55
import (
6-
_ "fmt"
6+
"os/exec"
77
"strings"
88
"testing"
99

@@ -47,6 +47,20 @@ func psScaleTest(t *testing.T, params *itutils.DeisTestConfig) {
4747
cmd = strings.Replace(cmd, "web", "cmd", 1)
4848
}
4949
itutils.Execute(t, cmd, params, false, "")
50+
// Regression test for https://github.com/deis/deis/pull/1347
51+
// Ensure that systemd unitfile droppings are cleaned up.
52+
sshCmd := exec.Command("ssh",
53+
"-o", "StrictHostKeyChecking=no",
54+
"-o", "UserKnownHostsFile=/dev/null",
55+
"-o", "PasswordAuthentication=no",
56+
"core@deis."+params.Domain, "ls")
57+
out, err := sshCmd.Output()
58+
if err != nil {
59+
t.Fatal(err)
60+
}
61+
if strings.Contains(string(out), ".service") {
62+
t.Fatalf("systemd files left on filesystem: \n%s", out)
63+
}
5064
}
5165

5266
func TestPs(t *testing.T) {

0 commit comments

Comments
 (0)