-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
82 additions
and
3 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
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,2 @@ | ||
Usage: grep [OPTION]... PATTERNS [FILE]... | ||
Try 'grep --help' for more information. |
Binary file not shown.
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,25 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
# test specific setup | ||
bigiq_qkviewid=$(<./bigiq_qkviewid) | ||
|
||
|
||
# check if Sevirity is part of the response | ||
[[ $(./ihac-diagnostics $bigiq_qkviewid | grep -e 'Severity: LOW' -e 'Severity: MEDIUM' -e 'Severity: HIGH' | wc -l) -gt 0 ]] || exit 1 | ||
|
||
|
||
# check if SOLs/K entries exist | ||
[[ $(./ihac-diagnostics $bigiq_qkviewid | grep -e 'SOLs:.*f5\.com' | wc -l) -gt 0 ]] || exit 1 | ||
|
||
|
||
# check if json is returned | ||
./ihac-diagnostics --json $bigiq_qkviewid | jq . >/dev/null 2>&1 || exit 1 | ||
|
||
|
||
# check if valid xml is returned | ||
./ihac-diagnostics --xml $bigiq_qkviewid | xmllint - >/dev/null 2>&1 || exit 1 | ||
|
||
|
||
# check behaviour when qkview does not exist | ||
[[ $(./ihac-diagnostics 245245245 2>&1) == "Error: qkview ID not found." ]] || exit 1 |
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,26 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
# test specific setup | ||
bigiq_qkviewid=$(<./bigiq_qkviewid) | ||
mkdir -p ./fileget_bigiq | ||
|
||
|
||
# test simple file fetch | ||
./ihac-fileget $bigiq_qkviewid /VERSION | grep '^Product:' > /dev/null || exit 1 | ||
|
||
|
||
# test directory ./directory-does-not-exist does not exist | ||
missing_directory=$(./ihac-fileget -o ./directory-does-not-exist/ $bigiq_qkviewid /config/bigip.conf 2>&1 && exit 1) || \ | ||
echo "$missing_directory" | grep 'directory-does-not-exist' > /dev/null || exit 1 | ||
|
||
|
||
# download multiple files to output directory | ||
./ihac-fileget --output-directory ./fileget_bigiq/ $bigiq_qkviewid /VERSION /config/bigip.conf && \ | ||
grep 'TMSH-VERSION' ./fileget_bigiq/config/bigip.conf && \ | ||
grep '^Product:' ./fileget_bigiq/VERSION | ||
|
||
|
||
# download multiple files to output directory using wildcards | ||
./ihac-fileget --output-directory ./fileget_bigiq/ $bigiq_qkviewid /config/bigip*.conf /etc/security/* && \ | ||
[[ $(find ./fileget_bigiq -type f | wc -l) -gt 2 ]] || exit 1 |
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,17 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
# test specific setup | ||
bigiq_qkviewid=$(<./bigiq_qkviewid) | ||
|
||
|
||
# test qkview deletion | ||
[[ "$(./ihac-qkviewdelete $bigiq_qkviewid)" == "$bigiq_qkviewid OK" ]] || exit 1 | ||
|
||
|
||
# check if qkview was removed from ihealth | ||
./ihac-qkviewlist | grep $bigiq_qkviewid && exist 1 || true | ||
|
||
|
||
# check behaviour when qkview does not exist | ||
[[ $(./ihac-qkviewdelete 245245245 2>&1) == "Error: qkview ID not found." ]] || exit 1 |
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