From cd3abc3871861879243a4ecfab42c47101460c52 Mon Sep 17 00:00:00 2001 From: Stanislav Zhuk Date: Mon, 30 Sep 2024 12:55:26 +0300 Subject: [PATCH 1/2] test --- .github/workflows/tests.yml | 11 +++++++++-- tests/test.bats | 34 +++++++--------------------------- 2 files changed, 16 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 34daca1..edc07d0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,16 +30,23 @@ jobs: tests: strategy: matrix: - ddev_version: [stable, HEAD] + ddev_version: [stable] fail-fast: false runs-on: ubuntu-latest steps: - - uses: ddev/github-action-add-on-test@v2 + - name: Check shell options before and after disabling history expansion + run: | + echo "Before set +H: $-" + set +H + echo "After set +H: $-" + + - uses: julienloizelet/ddev-add-on-test@b6b8c765ddba5fa511c2f9284e818d7fa3230f27 with: ddev_version: ${{ matrix.ddev_version }} token: ${{ secrets.GITHUB_TOKEN }} debug_enabled: ${{ github.event.inputs.debug_enabled }} addon_repository: ${{ env.GITHUB_REPOSITORY }} addon_ref: ${{ env.GITHUB_REF }} + #test_command: "bats tests --filter-tags !release" diff --git a/tests/test.bats b/tests/test.bats index 502698b..7788ba6 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -25,35 +25,15 @@ teardown() { grep -F 'settings.ddev.redis.php' web/sites/default/settings.php } -@test "non-Drupal installation" { - ddev config --project-name=${PROJNAME} --project-type=laravel --docroot=web --create-docroot - ddev start -y - cd ${TESTDIR} - ddev get ${DIR} - ddev restart - ddev redis-cli INFO | grep "^redis_version:6." - # Drupal configuration should not be present - [ ! -f web/sites/default/settings.ddev.redis.php ] -} - -@test "Drupal 7 installation" { - ddev config --project-name=${PROJNAME} --project-type=drupal7 --docroot=web --create-docroot - ddev start -y - cd ${TESTDIR} - ddev get ${DIR} - ddev restart - ddev redis-cli INFO | grep "^redis_version:6." - # Drupal configuration should not be present - [ ! -f web/sites/default/settings.ddev.redis.php ] -} - -@test "Drupal 9 installation without settings management" { - ddev config --project-name=${PROJNAME} --disable-settings-management --project-type=drupal9 --docroot=web --create-docroot +# bats test_tags=release +@test "install from release" { + ddev config --project-name=${PROJNAME} --project-type=drupal9 --docroot=web --create-docroot ddev start -y cd ${TESTDIR} - ddev get ${DIR} + ddev get ddev/ddev-redis ddev restart ddev redis-cli INFO | grep "^redis_version:6." - # Drupal configuration should not be present - [ ! -f web/sites/default/settings.ddev.redis.php ] + # Check if Redis configuration was setup. + [ -f web/sites/default/settings.ddev.redis.php ] + grep -F 'settings.ddev.redis.php' web/sites/default/settings.php } From b38723eed14ae0571fbb38194643e91692b2d63a Mon Sep 17 00:00:00 2001 From: Stanislav Zhuk Date: Mon, 30 Sep 2024 13:32:03 +0300 Subject: [PATCH 2/2] pr --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index edc07d0..19485fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -40,7 +40,7 @@ jobs: run: | echo "Before set +H: $-" set +H - echo "After set +H: $-" + echo "1After set +H: $-" - uses: julienloizelet/ddev-add-on-test@b6b8c765ddba5fa511c2f9284e818d7fa3230f27 with: