👻 Brief Description
While I am working on my test suites, it is not uncommon for me to run multiple kitchen verify commands in succession with changes between them. The issue I have encountered is that if I rename a file or remove a file, the original file is left on the SUT and therefore gets run as part of the kitchen verify call.
Version
1.2.0
Environment
- Test Kitchen (v3.3.2)
- macOS 12.6.1
- kitchen-pester 1.2.0
Scenario
See Description.
Steps to Reproduce
Using this repository for reproduction:
- Edit
./tests/integration/pester/default.tests.ps1 to make a test fail.
- Run
kitchen verify (Note: you may need to update the .kitchen.yml file to point to StefanScherer/windows_2016 instead of stefanscherer/windows_2016)
- Note that your test failed.
- Run
git restore . to restore the file and remove the failing test
- Rename
./tests/integration/pester/default.tests.ps1 to be something else (I named mine ./tests/integration/pester/my.tests.ps1)
- Run
kitchen verify
- Note that your new file runs fine, but the failing test from
default.tests.ps1 is still there and failing even though it's no longer in your tests on the host...
Expected Result
Ideally any files that do not exist on your host should not exist on the SUT.
Actual Result
Files that were previously on your host and have been moved/deleted still exist on the SUT.
➕ Additional context
The scenario where this happens is restricted to just while building the tests. When running them you won't typically be moving the files around and running a verify without destroying the kitchen first.
👻 Brief Description
While I am working on my test suites, it is not uncommon for me to run multiple
kitchen verifycommands in succession with changes between them. The issue I have encountered is that if I rename a file or remove a file, the original file is left on the SUT and therefore gets run as part of thekitchen verifycall.Version
1.2.0
Environment
Scenario
See Description.
Steps to Reproduce
Using this repository for reproduction:
./tests/integration/pester/default.tests.ps1to make a test fail.kitchen verify(Note: you may need to update the.kitchen.ymlfile to point toStefanScherer/windows_2016instead ofstefanscherer/windows_2016)git restore .to restore the file and remove the failing test./tests/integration/pester/default.tests.ps1to be something else (I named mine./tests/integration/pester/my.tests.ps1)kitchen verifydefault.tests.ps1is still there and failing even though it's no longer in your tests on the host...Expected Result
Ideally any files that do not exist on your host should not exist on the SUT.
Actual Result
Files that were previously on your host and have been moved/deleted still exist on the SUT.
➕ Additional context
The scenario where this happens is restricted to just while building the tests. When running them you won't typically be moving the files around and running a verify without destroying the kitchen first.