mirror of
https://github.com/katanemo/plano.git
synced 2026-05-04 05:12:55 +02:00
Update arch_config and add tests for arch config file (#407)
This commit is contained in:
parent
d0a783cca8
commit
e40b13be05
31 changed files with 379 additions and 212 deletions
20
arch/validate_arch_config.sh
Normal file
20
arch/validate_arch_config.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/bash
|
||||
|
||||
failed_files=()
|
||||
|
||||
for file in $(find . -name arch_config.yaml -o -name arch_config_full_reference.yaml); do
|
||||
echo "Validating $file..."
|
||||
if ! docker run --rm -v "$(pwd)/$file:/app/arch_config.yaml:ro" --entrypoint /bin/sh katanemo/archgw:latest -c "python config_generator.py" 2>&1 > /dev/null ; then
|
||||
echo "Validation failed for $file"
|
||||
failed_files+=("$file")
|
||||
fi
|
||||
done
|
||||
|
||||
# Print summary of failed files
|
||||
if [ ${#failed_files[@]} -ne 0 ]; then
|
||||
echo -e "\nValidation failed for the following files:"
|
||||
printf '%s\n' "${failed_files[@]}"
|
||||
exit 1
|
||||
else
|
||||
echo -e "\nAll files validated successfully!"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue