rename project to runaway
This commit is contained in:
@@ -5,7 +5,7 @@ setup() {
|
||||
load '../lib/launchd.sh'
|
||||
load '../lib/monitor.sh'
|
||||
TEST_DIR=$(mktemp -d)
|
||||
SCRIPT_PATH="$TEST_DIR/unleash"
|
||||
SCRIPT_PATH="$TEST_DIR/runaway"
|
||||
}
|
||||
|
||||
teardown() {
|
||||
@@ -26,30 +26,30 @@ teardown() {
|
||||
SCRIPT_DIR="$TEST_DIR"
|
||||
mkdir -p "$TEST_DIR"
|
||||
run install_monitor_launchdaemon "$TEST_DIR" 2>/dev/null || true
|
||||
[ -f "$TEST_DIR/Library/LaunchDaemons/com.unleash.monitor.plist" ]
|
||||
[ -f "$TEST_DIR/Library/LaunchDaemons/com.runaway.monitor.plist" ]
|
||||
}
|
||||
|
||||
@test "install_monitor_launchdaemon plist is valid xml" {
|
||||
SCRIPT_DIR="$TEST_DIR"
|
||||
mkdir -p "$TEST_DIR"
|
||||
run install_monitor_launchdaemon "$TEST_DIR" 2>/dev/null || true
|
||||
run grep -c "plist" "$TEST_DIR/Library/LaunchDaemons/com.unleash.monitor.plist"
|
||||
run grep -c "plist" "$TEST_DIR/Library/LaunchDaemons/com.runaway.monitor.plist"
|
||||
[ "$output" -gt 0 ]
|
||||
}
|
||||
|
||||
@test "install_monitor_launchdaemon references unleash binary" {
|
||||
@test "install_monitor_launchdaemon references runaway binary" {
|
||||
SCRIPT_DIR="$TEST_DIR"
|
||||
mkdir -p "$TEST_DIR"
|
||||
run install_monitor_launchdaemon "$TEST_DIR" 2>/dev/null || true
|
||||
run grep -c "unleash" "$TEST_DIR/Library/LaunchDaemons/com.unleash.monitor.plist"
|
||||
run grep -c "runaway" "$TEST_DIR/Library/LaunchDaemons/com.runaway.monitor.plist"
|
||||
[ "$output" -gt 0 ]
|
||||
}
|
||||
|
||||
@test "uninstall_monitor_launchdaemon removes plist" {
|
||||
mkdir -p "$TEST_DIR/Library/LaunchDaemons"
|
||||
touch "$TEST_DIR/Library/LaunchDaemons/com.unleash.monitor.plist"
|
||||
touch "$TEST_DIR/Library/LaunchDaemons/com.runaway.monitor.plist"
|
||||
run uninstall_monitor_launchdaemon "$TEST_DIR" 2>/dev/null || true
|
||||
[ ! -f "$TEST_DIR/Library/LaunchDaemons/com.unleash.monitor.plist" ]
|
||||
[ ! -f "$TEST_DIR/Library/LaunchDaemons/com.runaway.monitor.plist" ]
|
||||
}
|
||||
|
||||
@test "monitor_mdm requires root" {
|
||||
|
||||
Reference in New Issue
Block a user