Moved test_pools to test.sh
This commit is contained in:
parent
4a2cb7b28e
commit
2916cdc102
@ -17,24 +17,3 @@ get_pool_ranges () {
|
||||
ARRAY+=( "$RANGE" )
|
||||
done <<< "$( grep -Eo $POOL_RANGE_REGEX <<< "$CONTENT" )"
|
||||
}
|
||||
|
||||
|
||||
test_pools () {
|
||||
local -a POOLS
|
||||
local CONTENT="${1:?"test_pools: Content not provided"}"
|
||||
|
||||
get_pool_declerations POOLS "$CONTENT"
|
||||
|
||||
for pool in ${!POOLS[@]}; do
|
||||
echo "POOL: $pool"
|
||||
POOL_CONTENT="${POOLS[$pool]}"
|
||||
local -a RANGES
|
||||
get_pool_ranges RANGES "$POOL_CONTENT"
|
||||
|
||||
for range in ${!RANGES[@]}; do
|
||||
echo " RANGE: ${RANGES[$range]}"
|
||||
done
|
||||
|
||||
unset RANGES
|
||||
done
|
||||
}
|
||||
|
@ -1,4 +1,23 @@
|
||||
#!/bin/bash
|
||||
test_pools () {
|
||||
local -a POOLS
|
||||
local CONTENT="${1:?"test_pools: Content not provided"}"
|
||||
|
||||
get_pool_declerations POOLS "$CONTENT"
|
||||
|
||||
for pool in ${!POOLS[@]}; do
|
||||
echo "POOL: $pool"
|
||||
POOL_CONTENT="${POOLS[$pool]}"
|
||||
local -a RANGES
|
||||
get_pool_ranges RANGES "$POOL_CONTENT"
|
||||
|
||||
for range in ${!RANGES[@]}; do
|
||||
echo " RANGE: ${RANGES[$range]}"
|
||||
done
|
||||
|
||||
unset RANGES
|
||||
done
|
||||
}
|
||||
|
||||
test_all () {
|
||||
local -A SHARED_NETWORKS
|
||||
|
Loading…
Reference in New Issue
Block a user