From 0e5f046a678d233fcd0e2d67dd7b2c5a9baca999 Mon Sep 17 00:00:00 2001 From: Mike Pirog Date: Wed, 4 Sep 2024 16:45:25 -0400 Subject: [PATCH] add tests for recipe cache rebuild persistence (#202) * add tests for recipe cache rebuild persistence * add tests for recipe cache rebuild persistence part 2 --- .github/workflows/pr-core-tests.yml | 2 +- CHANGELOG.md | 2 ++ examples/rebuild/.lando.yml | 5 +++++ examples/rebuild/README.md | 5 +++++ examples/recipes/README.md | 5 +++++ examples/recipes/plugin-recipe-test/builders/test.js | 12 +++++++++--- 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-core-tests.yml b/.github/workflows/pr-core-tests.yml index f489cbeb7..283683bb5 100644 --- a/.github/workflows/pr-core-tests.yml +++ b/.github/workflows/pr-core-tests.yml @@ -16,7 +16,7 @@ jobs: # uncomment to test against edge cli - 3-edge-slim # uncomment to test against dev cli - # - 3-dev-slim + - 3-dev-slim leia-test: - badname - build diff --git a/CHANGELOG.md b/CHANGELOG.md index 16eec7881..aed08c229 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* This release contains only tests and is mostly to keep version sync with the CLI + ## v3.22.0-beta.5 - [September 4, 2024](https://github.com/lando/core/releases/tag/v3.22.0-beta.5) ### New Features diff --git a/examples/rebuild/.lando.yml b/examples/rebuild/.lando.yml index a023aeb5d..3da5ddcbb 100644 --- a/examples/rebuild/.lando.yml +++ b/examples/rebuild/.lando.yml @@ -29,5 +29,10 @@ services: app-mount: destination: /usr/share/nginx/html +tooling: + do-i-exist: + service: web2 + cmd: echo icachethereforeiam + plugins: "@lando/core": "../.." diff --git a/examples/rebuild/README.md b/examples/rebuild/README.md index 229785ac4..a64418429 100644 --- a/examples/rebuild/README.md +++ b/examples/rebuild/README.md @@ -41,6 +41,11 @@ docker ps --filter label=com.docker.compose.project=landorebuild | grep landoreb docker ps --filter label=com.docker.compose.project=landorebuild | grep landorebuild_web2_1 docker ps --filter label=com.docker.compose.project=landorebuild | grep landorebuild_web3_1 docker ps --filter label=com.docker.compose.project=landorebuild | grep landorebuild_web4_1 + +# Should persist tooling cache between rebuilds +lando do-i-exist | grep icachethereforeiam +lando rebuild -y +lando do-i-exist | grep icachethereforeiam ``` ## Destroy tests diff --git a/examples/recipes/README.md b/examples/recipes/README.md index 73b8a7875..469bf3b80 100644 --- a/examples/recipes/README.md +++ b/examples/recipes/README.md @@ -29,6 +29,11 @@ lando recipe | grep "I WORKED\!" # Should load in correct recipe tooling lando env | grep LANDO_SERVICE_NAME | grep web +# Should persist recipe tooling cache between rebuilds +lando do-i-exist | grep icachethereforeiam +lando rebuild -y +lando do-i-exist | grep icachethereforeiam + # Should add recipe services skip diff --git a/examples/recipes/plugin-recipe-test/builders/test.js b/examples/recipes/plugin-recipe-test/builders/test.js index 4d31afee2..e035444b8 100644 --- a/examples/recipes/plugin-recipe-test/builders/test.js +++ b/examples/recipes/plugin-recipe-test/builders/test.js @@ -12,9 +12,15 @@ module.exports = { config: { proxy: {}, services: {}, - tooling: {env: { - service: 'web', - }}, + tooling: { + 'do-i-exist': { + service: 'web', + cmd: 'echo icachethereforeiam', + }, + 'env': { + service: 'web', + }, + }, }, builder: (parent, config) => class LandoDrupal7 extends parent { constructor(id, options = {}) {