From e2d8a7d086a8eeec363eaaafa4c772643ec10c6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20B=C3=BCtler?= <48495685+fbuetler@users.noreply.github.com> Date: Fri, 2 Jul 2021 08:27:17 +0200 Subject: [PATCH] fix minor typo (#1991) close #1990 --- patroni/ha.py | 2 +- tests/test_ha.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/patroni/ha.py b/patroni/ha.py index 7d08dcae..ee1c78e8 100644 --- a/patroni/ha.py +++ b/patroni/ha.py @@ -1002,7 +1002,7 @@ class Ha(object): else: return self.enforce_master_role( 'no action. I am ({0}) the leader with the lock'.format(self.state_handler.name), - 'promoted self to leader because i had the session lock' + 'promoted self to leader because I had the session lock' ) else: # Either there is no connection to DCS or someone else acquired the lock diff --git a/tests/test_ha.py b/tests/test_ha.py index 85f1cfc8..68a9a4ea 100644 --- a/tests/test_ha.py +++ b/tests/test_ha.py @@ -300,7 +300,7 @@ class TestHa(PostgresInit): self.p.is_healthy = true self.ha.has_lock = true self.p.controldata = lambda: {'Database cluster state': 'in production', 'Database system identifier': SYSID} - self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock') + self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock') @patch('psycopg2.connect', psycopg2_connect) def test_acquire_lock_as_master(self): @@ -354,7 +354,7 @@ class TestHa(PostgresInit): self.ha.cluster.is_unlocked = false self.ha.has_lock = true self.p.is_leader = false - self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because i had the session lock') + self.assertEqual(self.ha.run_cycle(), 'promoted self to leader because I had the session lock') def test_promote_without_watchdog(self): self.ha.cluster.is_unlocked = false