Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to allow non-numeric formats. #68

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions template/7/aerospike.template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ network {

namespace ${NAMESPACE} {
replication-factor 1
$( (("${DEFAULT_TTL}" != 0 )) && echo "default-ttl ${DEFAULT_TTL}")
$( (("${DEFAULT_TTL}" != 0 )) && echo "nsup-period ${NSUP_PERIOD}")
$( [[ "DEFAULT_TTL" != "0" ]] && echo "default-ttl ${DEFAULT_TTL}")
$( [[ "DEFAULT_TTL" != "0" ]] && echo "nsup-period ${NSUP_PERIOD}")

storage-engine $([ "${DATA_IN_MEMORY}" = "true" ] && echo "memory" || echo "device") {
# For 'storage-engine memory' with 'device' or 'file' backing, we
Expand Down
19 changes: 14 additions & 5 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,14 @@ function run_docker() {
log_info "------ Running docker image ${IMAGE_TAG} ..."

if [ "${EDITION}" = "community" ] || version_compare_gt "${version}" "6.1"; then
verbose_call docker run -td --name "${CONTAINER}" "${PLATFORM/#/"--platform="}" \
"${IMAGE_TAG}"
verbose_call docker run -td --name "${CONTAINER}" -e "DEFAULT_TTL=30d" \
"${PLATFORM/#/"--platform="}" "${IMAGE_TAG}"
else
# Must supply a feature key when version is prior to 6.1.
verbose_call docker run -td --name "${CONTAINER}" "${PLATFORM/#/"--platform="}" \
-v "/$(pwd)/res/":/asfeat/ -e "FEATURE_KEY_FILE=/asfeat/eval_features.conf" \
"${IMAGE_TAG}"
verbose_call docker run -td --name "${CONTAINER}" \
"${PLATFORM/#/"--platform="}" -v "/$(pwd)/res/":/asfeat/ \
-e "DEFAULT_TTL=30d" \
-e "FEATURE_KEY_FILE=/asfeat/eval_features.conf" "${IMAGE_TAG}"
fi
}

Expand Down Expand Up @@ -173,6 +174,14 @@ function check_container() {
log_failure "**(${tool}) Aerospike database does not have namespace 'test' - '${namespace}'"
fi

default_ttl=$(try 5 docker exec -t "${CONTAINER}" bash -c 'asinfo -v "get-config:context=namespace;id=test" -l' | grep default-ttl | grep -oE "[0-9]+")

if ((default_ttl == 2592000)); then
log_success "Found expected 30d ttl - '${default_ttl}'"
else
log_failure "Did not find expected 30d ttl - '${default_ttl}'"
fi

log_info "------ Verify docker image completed successfully"
}

Expand Down
Loading