diff --git a/src/api/commands.c b/src/api/commands.c index a8b0a37..2c4ba38 100644 --- a/src/api/commands.c +++ b/src/api/commands.c @@ -82,9 +82,11 @@ write_crontabs_command (int client_fd) { char* cmd_esc = escape_json_string(ce->cmd); char* s = s_fmt( - "{\"id\":\"%d\",\"cmd\":\"%s\",\"schedule\":\"%s\",\"owner\":\"%s\"," + "{\"id\":\"%d\",\"filepath\":\"%s\",\"cmd\":\"%s\",\"schedule\":\"%s\"," + "\"owner\":\"%s\"," "\"envp\":\"%s\",\"next\":\"%s\"}%s", ce->id, + entry->key, cmd_esc, ce->schedule, ct->uname, diff --git a/t/integ/ipc_shpec.bash b/t/integ/ipc_shpec.bash index 10ae757..9e479e6 100644 --- a/t/integ/ipc_shpec.bash +++ b/t/integ/ipc_shpec.bash @@ -149,11 +149,12 @@ describe 'ipc API IPC_SHOW_INFO command' end_describe describe 'ipc API IPC_LIST_CRONTABS command' - n_syscrontabs="$(find /etc/cron.{hourly,daily,weekly,monthly} -type f 2>/dev/null | wc -l)" + n_syscrontabs="$(find /etc/cron.{hourly,daily,weekly,monthly} -type f 2>/dev/null | wc -l)" start_chronic sleep 5 - out="$(sock_call '{ "command" : "IPC_LIST_CRONTABS"}' 2>/dev/null | tr -d '\0')" + out="$(sock_call '{ "command" : "IPC_LIST_CRONTABS"}')" + echo ">>>>> $(echo "$out" | wc -l)" it 'lists all crontabs' assert equal $(jq 'length' <<< "$out") "$((n_syscrontabs + 3))" @@ -177,7 +178,8 @@ describe 'ipc API IPC_LIST_JOBS command' echo 'sleeping for 60 seconds...' sleep 60 - out="$(sock_call '{ "command" : "IPC_LIST_JOBS"}' 2>/dev/null | tr -d '\0')" + out="$(sock_call '{ "command" : "IPC_LIST_JOBS"}')" + echo ">>> $out" it 'lists all jobs' assert gt "$(jq 'length' <<< "$out")" 0 diff --git a/t/integ/utils/run.bash b/t/integ/utils/run.bash index d7303d1..ae7a349 100755 --- a/t/integ/utils/run.bash +++ b/t/integ/utils/run.bash @@ -5,12 +5,12 @@ TESTING_DIR=t/integ UTILS_F=run_utils.bash declare -a SKIP_FILES=( - # 'daemon_shpec.bash' + 'daemon_shpec.bash' # 'ipc_shpec.bash' - # 'peripherals_shpec.bash' - # 'root_shpec.bash' - # 'sig_shpec.bash' - # 'user_shpec.bash' + 'peripherals_shpec.bash' + 'root_shpec.bash' + 'sig_shpec.bash' + 'user_shpec.bash' ) run_test () {