Skip to content

Commit 0fbdb1a

Browse files
fix: correct org name of nodejs-mongodb-sample starter project and refactor condition to use a key-based assoc array (#397)
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
1 parent cc3360c commit 0fbdb1a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

test/check_registry/check_registry.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ REGISTRY_ENTRIES_OUTPUT=$(go run test/check_registry/check_registry.go)
3434
ENTRIES_PASSED=0
3535
ENTRIES_FAILED=0
3636

37+
# Declare a map of similar devfile starter projects to ignore errors for
38+
declare -A IGNORED_SIMILAR_DEVFILES=(
39+
["https://github.com/devfile-samples/nodejs-mongodb-sample"]="nodejs"
40+
)
41+
3742
for entry in $(echo $REGISTRY_ENTRIES_OUTPUT | jq -c '.[]')
3843
do
3944
# Assign variables for this entry
@@ -84,8 +89,8 @@ do
8489

8590
# If the correct devfile is not matched throw error
8691
if [ "$found_matching" == "0" ]; then
87-
# nodejs-mongodb similar to nodejs
88-
if [[ "$repo" == "https://github.com/che-samples/nodejs-mongodb-sample" && "$selected_devfile_name" == "nodejs" ]]; then
92+
# ignore error on similar devfiles
93+
if [[ "${IGNORED_SIMILAR_DEVFILES[$repo]}" == "$selected_devfile_name" ]]; then
8994
echo "[WARNING] $repo matched with $selected_devfile_name instead of $devfile. Will not raise error."
9095
else
9196
let ENTRIES_FAILED++

0 commit comments

Comments
 (0)