Browse Source

fix: dev: [cron] make test pass again

pull/43/head
Valentin Lab 5 months ago
parent
commit
115fb33060
  1. 2
      cron/lib/common
  2. 11
      cron/test/entries_from_service

2
cron/lib/common

@ -73,7 +73,7 @@ cron:get_config() {
;;
esac > "$cache_file.tmp"
mv -v "$cache_file.tmp" "$cache_file" >&2
mv "$cache_file.tmp" "$cache_file" >&2
## if cache file is empty, this is an error
if [ ! -s "$cache_file" ]; then

11
cron/test/entries_from_service

@ -45,11 +45,6 @@ cfg-get-value() {
}
export -f cfg-get-value
yaml_get_interpret() {
shyaml get-value
}
export -f yaml_get_interpret
get_top_master_service_for_service() {
local service="$1"
echo "$service"
@ -62,6 +57,12 @@ get_service_charm() {
}
export -f get_service_charm
charm.get_dir() {
local charm="$1"
echo "/path/to/charm-store/$charm"
}
export -f charm.get_dir
export CACHEDIR=$(mktemp -d -t tmp.XXXXXXXXXX)
export state_tmpdir=$(mktemp -d -t tmp.XXXXXXXXXX)
trap "rm -rf \"$state_tmpdir\"" EXIT

Loading…
Cancel
Save