diff --git a/test/blackbox/pushpull_authn.bats b/test/blackbox/pushpull_authn.bats index 8d57ebb5dc..a131fdaa0b 100644 --- a/test/blackbox/pushpull_authn.bats +++ b/test/blackbox/pushpull_authn.bats @@ -173,3 +173,20 @@ EOF [ "$status" -eq 0 ] [ $(echo "${lines[-1]}" | jq '.manifests | length') -eq 0 ] } + +@test "ML artifacts" { + # download model data + curl -v -L0 https://github.com/tarilabs/demo20231212/raw/main/v1.nb20231206162408/mnist.onnx -o ${BATS_FILE_TMPDIR}/mnist.onnx + + # upload artifact with required annotations and version + run regctl artifact put --annotation description="used for demo purposes" --annotation model_format_name="onnx" --annotation model_format_name="onnx" --annotation model_format_version="1" --artifact-type "application/vnd.model.type" localhost:${zot_port}/models/my-model-from-gh:v1 -f ${BATS_FILE_TMPDIR}/mnist.onnx + + # list artifacts + run regctl artifact list localhost:${zot_port}/models/my-model-from-gh:v1 --format raw-body + + # list artifacts of type + run regctl artifact list --filter-artifact-type "application/vnd.model.type" localhost:${zot_port}/models/my-model-from-gh:v1 --format raw-body + + # get artifact + run regctl artifact get localhost:${zot_port}/models/my-model-from-gh:v1 +}