Skip to content

Commit

Permalink
Add test for relocatable rpm behaviour
Browse files Browse the repository at this point in the history
This test asserts the behaviour added by sbt/sbt-native-packager#661
  • Loading branch information
fsat committed Aug 4, 2018
1 parent 4b0fdfb commit c86ff96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sbt-test/rpm/sysvinit-rpm/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,10 @@ TaskKey[Unit]("check-spec-file") <<= (target, streams) map { (target, out) =>
assert(spec contains "addUser rpm-test", "Incorrect useradd command in \n" + spec)
assert(spec contains "deleteGroup rpm-test", "deleteGroup not present in \n" + spec)
assert(spec contains "deleteUser rpm-test", "deleteUser rpm not present in \n" + spec)
assert(spec contains
"""
|[ -e /etc/sysconfig/rpm-test ] && sed -i 's/PACKAGE_PREFIX\=.*//g' /etc/sysconfig/rpm-test
|[ -n "$RPM_INSTALL_PREFIX" ] && echo "PACKAGE_PREFIX=${RPM_INSTALL_PREFIX}" >> /etc/sysconfig/rpm-test
|""".stripMargin, "Persisting $RPM_INSTALL_PREFIX not present in \n" + spec)
()
}

0 comments on commit c86ff96

Please sign in to comment.