mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 08:21:07 -06:00
Normalise executions times to 0 in apply.json files of equivalence tests
This commit is contained in:
parent
816c801fb2
commit
92b201da37
12
.github/workflows/compare-snapshots.yml
vendored
12
.github/workflows/compare-snapshots.yml
vendored
@ -42,6 +42,18 @@ jobs:
|
||||
--goldens=testing/equivalence-tests/outputs \
|
||||
--binary=./bin/opentf
|
||||
|
||||
- name: Normalise execution time based changes
|
||||
shell: bash
|
||||
run: |
|
||||
changed_execution_time=${git diff --quiet -S "complete after 0s" -- testing/equivalence-tests/outputs || echo true)
|
||||
if [[ $changed == "true" ]]; then
|
||||
echo "Found changes in the execution times in the result outputs. Defaulting the execution times to 0"
|
||||
find testing/equivalence-tests/outputs -type f -name "apply.json" -exec sed -E -i 's/complete after [0-9]+s/complete after 0s/g' {} +
|
||||
find testing/equivalence-tests/outputs -type f -name "apply.json" -exec sed -E -i 's/\"elapsed_seconds\"\: [0-9]+/\"elapsed_seconds\"\: 0/g' {} +
|
||||
else
|
||||
echo "Found no in the execution time in result outputs."
|
||||
fi
|
||||
|
||||
- name: Ensure there is no diff
|
||||
shell: bash
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user