-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run test-llm-load-plugins.sh, refs #378
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
# This should only run in environemnts where both | ||
# llm-cluster and llm-sentence-transformers are installed | ||
|
||
PLUGINS=$(llm plugins) | ||
echo "$PLUGINS" | jq 'any(.[]; .name == "llm-sentence-transformers")' | \ | ||
grep -q true || ( \ | ||
echo "Test failed: llm-sentence-transformers not found" && \ | ||
exit 1 \ | ||
) | ||
# With the LLM_LOAD_PLUGINS we should not see that | ||
PLUGINS2=$(LLM_LOAD_PLUGINS=llm-cluster llm plugins) | ||
echo "$PLUGINS2" | jq 'any(.[]; .name == "llm-sentence-transformers")' | \ | ||
grep -q false || ( \ | ||
echo "Test failed: llm-sentence-transformers should not have been loaded" && \ | ||
exit 1 \ | ||
) | ||
echo "$PLUGINS2" | jq 'any(.[]; .name == "llm-cluster")' | \ | ||
grep -q true || ( \ | ||
echo "Test llm-cluster should have been loaded" && \ | ||
exit 1 \ | ||
) | ||
# With LLM_LOAD_PLUGINS='' we should see no plugins | ||
PLUGINS3=$(LLM_LOAD_PLUGINS='' llm plugins) | ||
echo "$PLUGINS3"| \ | ||
grep -q '\[\]' || ( \ | ||
echo "Test failed: plugins should have returned []" && \ | ||
exit 1 \ | ||
) |