-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from reubenmiller/fix-build-errors
build: improve error handling and case insensitivity
- Loading branch information
Showing
11 changed files
with
16 additions
and
17 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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,17 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -e | ||
#-------------------------------------------- | ||
# Generate the command tests from the specs | ||
#-------------------------------------------- | ||
|
||
# Delete existing folders to ensure there are no stale test files left behind | ||
rm -Rf ./tests/auto | ||
|
||
for file in $( find ./api/spec \( -name "*.yml" -or -name "*.yaml" \) ) | ||
while IFS= read -r -d '' file | ||
do | ||
name=$( basename "$file" | sed -E 's/.ya?ml//g' | tr A-Z a-z ) | ||
go run cmd/gen-tests/main.go "./tests/mocks.yaml" "$file" "./tests/auto/$name/tests" | ||
code=$? | ||
if [[ $code -ne 0 ]]; then | ||
echo "Error code: $file, exit_code=$code" | ||
name=$( basename "$file" | sed -E 's/.ya?ml//g' | tr '[:upper:]' '[:lower:]' ) | ||
if ! go run cmd/gen-tests/main.go "./tests/mocks.yaml" "$file" "./tests/auto/$name/tests"; then | ||
echo "Failed to generate cli tests: $file" >&2 | ||
exit 1 | ||
fi | ||
|
||
done | ||
done < <( find ./api/spec \( -name "*.yml" -or -name "*.yaml" \) -print0 ) |
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
2 changes: 1 addition & 1 deletion
2
tests/auto/remoteaccessconfigurations/tests/remoteaccess/configurations_update.yaml
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