T3MP3ST public launch build
This commit is contained in:
1 parent
972247b881
commit
184c7d4e59
1589 files changed
+57150
-506
No files matched your search
+50
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright IBM Corp. 2015, 2025
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
# plugin for host_volume_plugin_test.go
|
||||
set -xeuo pipefail
|
||||
|
||||
env 1>&2
|
||||
|
||||
test "$1" == "$DHV_OPERATION"
|
||||
|
||||
echo 'all operations should ignore stderr' 1>&2
|
||||
|
||||
case $1 in
|
||||
fingerprint)
|
||||
echo '{"version": "0.0.2"}' ;;
|
||||
create)
|
||||
test "$DHV_VOLUME_NAME" == 'test-vol-name'
|
||||
test "$DHV_VOLUME_ID" == 'test-vol-id'
|
||||
test "$DHV_NAMESPACE" == 'test-namespace'
|
||||
test "$DHV_CAPACITY_MIN_BYTES" -eq 5
|
||||
test "$DHV_CAPACITY_MAX_BYTES" -eq 10
|
||||
test "$DHV_NODE_ID" == 'test-node'
|
||||
test "$DHV_NODE_POOL" == 'test-node-pool'
|
||||
test "$DHV_PARAMETERS" == '{"key":"val"}'
|
||||
test "$DHV_PLUGIN_DIR" == './test_fixtures'
|
||||
test -d "$DHV_VOLUMES_DIR"
|
||||
target="$DHV_VOLUMES_DIR/$DHV_VOLUME_ID"
|
||||
test "$target" != '/'
|
||||
mkdir -p "$target"
|
||||
printf '{"path": "%s", "bytes": 5}' "$target"
|
||||
;;
|
||||
delete)
|
||||
test "$DHV_NODE_ID" == 'test-node'
|
||||
test "$DHV_NODE_POOL" == 'test-node-pool'
|
||||
test "$DHV_NAMESPACE" == 'test-namespace'
|
||||
test "$DHV_VOLUME_NAME" == 'test-vol-name'
|
||||
test "$DHV_VOLUME_ID" == 'test-vol-id'
|
||||
test "$DHV_PARAMETERS" == '{"key":"val"}'
|
||||
test "$DHV_PLUGIN_DIR" == './test_fixtures'
|
||||
test -d "$DHV_VOLUMES_DIR"
|
||||
target="$DHV_VOLUMES_DIR/$DHV_VOLUME_ID"
|
||||
test "$target" != '/'
|
||||
test "$DHV_CREATED_PATH" == "$target"
|
||||
rm -rfv "$target"
|
||||
;;
|
||||
*)
|
||||
echo "unknown operation $1"
|
||||
exit 1 ;;
|
||||
esac
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright IBM Corp. 2015, 2025
|
||||
# SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
printf '{"error": "%s: sad plugin is sad"}' $1
|
||||
echo "$1: it tells you all about it in stderr" 1>&2
|
||||
exit 1
|
||||
Reference in new issue
Block a user