Add a test case that creates and starts two nodes, has one assume the
primary role and the other the secondary role, writes to the device,
verifies that the data is synced to both nodes, then switches the roles,
and finally shuts both nodes down and compares their backing stores.
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
| sbin/hastd/tests/hastd_test.sh | ||
|---|---|---|
| 143–146 | Then we don't test that hastctl is capable of stopping hastd. | |
| sbin/hastd/tests/hastd_test.sh | ||
|---|---|---|
| 12 | BTW: I'd give a ship-it for this change right now -- thank you :)! | |
| 143–146 | Removing the files with rm -f (and without atf_check) masks issues if the files are missing. That seems less than ideal for the tests if your goal was to confirm that the services are no longer running if the pidfiles are gone. | |
| sbin/hastd/tests/hastd_test.sh | ||
|---|---|---|
| 143–146 | Stopping the service does not remove the pidfile. | |
| sbin/hastd/tests/hastd_test.sh | ||
|---|---|---|
| 143–146 |
Really? That seems like a bug in and of itself--especially since the service uses the pidfile(3) APIs to manage its PID files. | |
| sbin/hastd/tests/hastd_test.sh | ||
|---|---|---|
| 143–146 | It has never been a requirement. Looking at the code, it appears to remove its pidfile only when it fails to start, not when it terminates after having successfully started. | |