mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
run tests
This commit is contained in:
parent
40b339b2e3
commit
f18919ff15
5 changed files with 60 additions and 5 deletions
|
|
@ -24,8 +24,10 @@ RUN pip install -r requirements.txt
|
|||
COPY arch/tools/cli/config_generator.py .
|
||||
COPY arch/envoy.template.yaml .
|
||||
COPY arch/arch_config_schema.yaml .
|
||||
COPY arch/validate_schema.sh .
|
||||
|
||||
RUN pip install requests
|
||||
RUN touch /var/log/envoy.log
|
||||
RUN chmod a+x validate_schema.sh
|
||||
|
||||
ENTRYPOINT ["sh","-c", "python config_generator.py && envsubst < /etc/envoy/envoy.yaml > /etc/envoy.env_sub.yaml && envoy -c /etc/envoy.env_sub.yaml --component-log-level wasm:debug 2>&1 | tee /var/log/envoy.log"]
|
||||
|
|
|
|||
20
arch/validate_arch_config.sh
Normal file
20
arch/validate_arch_config.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
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
|
||||
1
arch/validate_schema.sh
Normal file
1
arch/validate_schema.sh
Normal file
|
|
@ -0,0 +1 @@
|
|||
python config_generator.py
|
||||
Loading…
Add table
Add a link
Reference in a new issue