Skip to content

Commit

Permalink
test added for daemon user in systemd #436
Browse files Browse the repository at this point in the history
  • Loading branch information
kardapoltsev committed Mar 30, 2015
1 parent 1e96478 commit 0861a25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sbt-test/debian/systemd-deb/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ packageDescription := """A fun package description of our software,

requiredStartFacilities in Debian := Some("network.target")

daemonUser in Linux := "testuser"

TaskKey[Unit]("check-startup-script") <<= (target, streams) map { (target, out) =>
val script = IO.read(target / "debian-test-0.1.0" / "usr" / "lib" / "systemd" / "system" / "debian-test.service")
assert(script.contains("Requires=network.target"), "script doesn't contain Default-Start header\n" + script)
assert(script.contains("User=testuser"), "script doesn't contain `User` header\n" + script)
out.log.success("Successfully tested systemd start up script")
()
}

0 comments on commit 0861a25

Please sign in to comment.