Protect writer stop jobs from competing healthcheck requests
This commit is contained in:
1 parent
3d16f33f24
commit
3730ab4676
5 files changed
+177
-2
No files matched your search
@@ -494,7 +494,8 @@ if '--list-only' not in sys.argv and '--exclude=/*' not in sys.argv and '--dry-r
|
||||
self.assertNotIn('systemctl stop',self.events.read_text())
|
||||
|
||||
def test_service_stop_and_start_failures_are_reported(self):
|
||||
self.run_script('app-backup.sh',ok=False,TEST_FAIL_SERVICE='stop:gitea')
|
||||
result=self.run_script('app-backup.sh',ok=False,TEST_FAIL_SERVICE='stop:gitea')
|
||||
self.assertIn('Could not stop writer gitea',result.stdout)
|
||||
self.assertEqual(json.loads(self.state.read_text()),self.initial)
|
||||
self.run_script('app-backup.sh',ok=False,TEST_FAIL_SERVICE='start:gitea')
|
||||
self.assertTrue(list((self.base/'work').glob('recovery-*.json')))
|
||||
|
||||
Reference in new issue
Block a user