Skip to content

Commit 28927bf

Browse files
committed
Add bats tests for pullling llama.cpp multimodal images
Signed-off-by: Oliver Walsh <[email protected]>
1 parent 9ca0b4c commit 28927bf

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

test/system/050-pull.bats

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,31 @@ load setup_suite
8282
run_ramalama list
8383
is "$output" ".*TinyLlama/TinyLlama-1.1B-Chat-v1.0" "image was actually pulled locally"
8484
run_ramalama rm huggingface://TinyLlama/TinyLlama-1.1B-Chat-v1.0
85+
86+
run_ramalama pull hf://ggml-org/SmolVLM-256M-Instruct-GGUF
87+
run_ramalama list
88+
is "$output" ".*ggml-org/SmolVLM-256M-Instruct-GGUF" "image was actually pulled locally"
89+
run_ramalama rm huggingface://ggml-org/SmolVLM-256M-Instruct-GGUF
90+
91+
run_ramalama pull hf://ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0
92+
run_ramalama list
93+
is "$output" ".*ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0" "image was actually pulled locally"
94+
run_ramalama rm huggingface://ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0
95+
}
96+
97+
# bats test_tags=distro-integration
98+
@test "ramalama pull huggingface tag multiple references" {
99+
run_ramalama pull hf://ggml-org/SmolVLM-256M-Instruct-GGUF
100+
run_ramalama list
101+
is "$output" ".*ggml-org/SmolVLM-256M-Instruct-GGUF" "image was actually pulled locally"
102+
run_ramalama --debug pull hf://ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0
103+
is "$output" ".*Using cached blob" "cached blob was used"
104+
run_ramalama list
105+
is "$output" ".*ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0" "reference was created to existing image"
106+
run_ramalama --debug rm huggingface://ggml-org/SmolVLM-256M-Instruct-GGUF
107+
is "$output" ".*Not removing snapshot" "snapshot with remaining reference was not deleted"
108+
run_ramalama --debug rm huggingface://ggml-org/SmolVLM-256M-Instruct-GGUF:Q8_0
109+
is "$output" ".*Snapshot removed" "snapshot with no remaining references was deleted"
85110
}
86111

87112
# bats test_tags=distro-integration

0 commit comments

Comments
 (0)