From 9a5ec76d7c50e49acb44997ba04e6359f3da79ff Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 16 Dec 2023 00:18:59 +0000 Subject: [PATCH] Remove bash snapshot tests --- run | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/run b/run index 29f45e9..91ee6fe 100755 --- a/run +++ b/run @@ -37,7 +37,6 @@ function build { function ci:test { nix develop --command composer install - nix develop --command ./run test:snapshots nix develop --command phpunit } @@ -72,41 +71,5 @@ function test:create-snapshot { git status "${output_path}" } -# Generate a file and ensure it matches the expected version. -function test:snapshots { - rm -rf .ignored/snapshots - mkdir -p .ignored/snapshots - - local configs=( - # TODO: add more configurations for different types and configurations. - drupal - drupal-commerce-kickstart - drupal-localgov - ) - - for config in "${configs[@]}"; do - config_file="tests/snapshots/configs/${config}.yaml" - input_path="tests/snapshots/output/${config}" - output_path=".ignored/snapshots/output/${config}" - - cat "${config_file}" - - ./bin/build-configs app:generate --config-file "${config_file}" --output-dir "${output_path}" - - find "${input_path}" -type f -print0 | while IFS= read -r -d '' original_file; do - generated_file="$output_path/${original_file#"${input_path}"/}" - - if cmp -s "${original_file}" "${generated_file}"; then - echo "Files match: ${original_file}" - else - # TODO: show the diff for all failed files. This will stop after the first failure. - echo "Files do not match: ${original_file}" - diff "${original_file}" "${generated_file}" - exit 1 - fi - done - done -} - TIMEFORMAT=$'\nTask completed in %3lR' time "${@:-help}"