-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests(refactor): Adjust mail_changedetector
+ change detection helpers
#2997
tests(refactor): Adjust mail_changedetector
+ change detection helpers
#2997
Commits on Jan 15, 2023
-
tests(refactor):
mail_changedetector.bats
- Leverage DRY methods`supervisorctl tail` is not the most reliably way to get logs for the latest change detection and has been known to be fragile in the past. We can instead read the full log for the service directly with `tac` and `sed` to extract all log content since the last change detection. Common asserts have also been extracted out into separate methods.
Configuration menu - View commit details
-
Copy full SHA for abafd43 - Browse repository at this point
Copy the full SHA abafd43View commit details -
tests(chore): Remove sleep and redundant change event
Container 1 is still blocked at this point from an existing lock and change event. Make the lock stale immediately and no extra sleep is required when paired with the helper method to wait until the event is processed (which should remove the stale lock).
Configuration menu - View commit details
-
Copy full SHA for 5b28815 - Browse repository at this point
Copy the full SHA 5b28815View commit details -
tests(refactor): Add more DRY methods
- Simplify the test case so it's easier to grok. - 2nd test case (blocking) extracts out initial setup into a separate method and merges the later service restart logic which is redundant. - Additional comments for improved context of what is going on / expected.
Configuration menu - View commit details
-
Copy full SHA for 4530f25 - Browse repository at this point
Copy the full SHA 4530f25View commit details -
tests(chore): Revise the change detection helper method
- Add explicit counting arg to change detection support. - Extract revised logic into it's own generic helper method. - Utilize this for a separate method that monitors for a change event having started, but not waiting for completion. This allows dropping the 40 sec of remaining `sleep` in `mail_changedetector` test. It was also required due to potentially missing the timing of a change event completing concurrently in a 2nd container that needed to be waited on and then checked.
Configuration menu - View commit details
-
Copy full SHA for 4729d10 - Browse repository at this point
Copy the full SHA 4729d10View commit details -
tests(chore): Migrate to current test conventions
- Switch to common container setup helpers - Update container name and change usage to variables instead. - Adopt the new convention of prefix variable for test cases (revised test case descriptions).
Configuration menu - View commit details
-
Copy full SHA for 4378031 - Browse repository at this point
Copy the full SHA 4378031View commit details -
tests(chore): Remove legacy change detection
This has since been replaced with the new helper watches the `changedetector` service logs directly instead of only detecting a change has occurred via checksum comparison. No tests use this method anymore, it was originally for `tests.bats`. Thus the tests in `test_helper.bats` are being dropped too. The new helper has test coverage in `changedetector` tests.
Configuration menu - View commit details
-
Copy full SHA for 3596a29 - Browse repository at this point
Copy the full SHA 3596a29View commit details -
chore: Lock removal should not incur
sleep 5
afterwards- A new lock should be created by this script after removal. The sleep doesn't help avoid a race condition with lock file creation after removal. - Reduces test time as a bonus. - Added some additional comments to test.
Configuration menu - View commit details
-
Copy full SHA for c3dbe4a - Browse repository at this point
Copy the full SHA c3dbe4aView commit details -
tests(chore):
tls_letsencrypt.bats
leverage improved change detection- No need to wait on the change detection service anymore during container startup. - No need to count change events processed either as waiting a fixed duration is no longer relied on. - This makes the reload count method redundant, dropped.
Configuration menu - View commit details
-
Copy full SHA for 5a4bd9b - Browse repository at this point
Copy the full SHA 5a4bd9bView commit details -
tests(chore): Convert
setup-cli.bats
to new test conventionsThis test file was already adapted to the original common setup helpers. - `TEST_NAME` replaced with `CONTAINER_NAME`. - Prefix var added, test case descriptions drop explicit prefix. - No other changes.
Configuration menu - View commit details
-
Copy full SHA for c9a8d5c - Browse repository at this point
Copy the full SHA c9a8d5cView commit details -
tests(chore): Extract out helpers related to change-detection
- New helper file for sharing these helpers to tests. - Includes the helpful log method from changedetector tests. - No longer need to maintain duplicate copies of these methods during the test migration. All tests that use them are now importing the separate helper file. - `tls_letsencrypt.bats` has switched to using the log helper. - Generic log count helper is removed from `test_helper/common.bash` as any test that needs it in future can adapt to `helper/common.bash`.
Configuration menu - View commit details
-
Copy full SHA for ae3dc4c - Browse repository at this point
Copy the full SHA ae3dc4cView commit details -
tests(refactor):
tls_letsencrypt.bats
remove_get_service_logs()
This helper does not seem useful as moving away from `supervisorctl tail` and no other tests had a need for it.
Configuration menu - View commit details
-
Copy full SHA for fa4ec9c - Browse repository at this point
Copy the full SHA fa4ec9cView commit details -
tests(chore): Remove common setup methods from
test_helper/common.bash
No other tests depend on this. Future tests will adopt the revised versions from `helper/setup.bash`. Additionally updates `helper/setup.bash` comments that are no longer applicable to `TEST_TMP_CONFIG` and `CONTAINER_NAME`.
Configuration menu - View commit details
-
Copy full SHA for a04a147 - Browse repository at this point
Copy the full SHA a04a147View commit details -
Review feedback Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a28d19d - Browse repository at this point
Copy the full SHA a28d19dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 91610dc - Browse repository at this point
Copy the full SHA 91610dcView commit details -
chore: Simplify setting
EXPECTED_COUNT
Co-authored-by: Casper <casperklein@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 32aea55 - Browse repository at this point
Copy the full SHA 32aea55View commit details -
Revert "chore: Simplify setting
EXPECTED_COUNT
"This reverts commit ed8078b.
Configuration menu - View commit details
-
Copy full SHA for 655bb50 - Browse repository at this point
Copy the full SHA 655bb50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0893c98 - Browse repository at this point
Copy the full SHA 0893c98View commit details
Commits on Jan 16, 2023
-
Configuration menu - View commit details
-
Copy full SHA for cbf58ef - Browse repository at this point
Copy the full SHA cbf58efView commit details