Found via `codespell -H` and `typos --hidden --format brief`
This commit is contained in:
Kian-Meng Ang
2024-11-12 10:06:53 +01:00
committed by GitHub
parent efba02f52e
commit 4ce0f99cfb
35 changed files with 94 additions and 94 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class TestAWSConnection(unittest.TestCase):
self.assertFalse(conn.on_role_change("primary"))
@patch.object(botocore.awsrequest.AWSResponse, 'text', PropertyMock(return_value='boo'))
def test_aws_bizare_response(self):
def test_aws_bizarre_response(self):
conn = AWSConnection('test')
self.assertFalse(conn.aws_available())
+1 -1
View File
@@ -258,7 +258,7 @@ class TestBootstrap(BaseTestPostgresql):
self.b.post_bootstrap({'users': 1}, task)
self.assertEqual(mock_logger.call_args_list[0][0][0],
'User creation is not be supported starting from v4.0.0. '
'Please use "boostrap.post_bootstrap" script to create users.')
'Please use "bootstrap.post_bootstrap" script to create users.')
self.assertTrue(task.result)
self.b.bootstrap(config)
+1 -1
View File
@@ -98,7 +98,7 @@ class TestCitus(BaseTestPostgresql):
self.c.add_task('after_promote', 0, self.cluster, self.cluster.leader_name, 'postgres://host1:5432/postgres')
with patch.object(CitusHandler, 'update_node') as mock_update_node:
self.c.process_tasks()
# process_task() shouln't be called because pick_task double checks with _pg_dist_group
# process_task() shouldn't be called because pick_task double checks with _pg_dist_group
mock_update_node.assert_not_called()
def test_process_task(self):
+1 -1
View File
@@ -337,7 +337,7 @@ class TestGenerateConfig(unittest.TestCase):
_main()
self.assertIn('Failed to read pg_ident.conf', e.exception.code)
# 9. Failed PG connecttion
# 9. Failed PG connection
from . import psycopg
with patch('patroni.psycopg.connect', side_effect=psycopg.Error), \
self.assertRaises(SystemExit) as e:
+1 -1
View File
@@ -1587,7 +1587,7 @@ class TestHa(PostgresInit):
self.ha.cluster = get_cluster_initialized_with_leader()
self.ha.watch(0)
def test_wakup(self):
def test_wakeup(self):
self.ha.wakeup()
def test_shutdown(self):
+1 -1
View File
@@ -274,7 +274,7 @@ class TestPostgresql(BaseTestPostgresql):
self.assertEqual(self.p.checkpoint({'user': 'postgres'}), 'is_in_recovery=true')
with patch.object(MockCursor, 'execute', Mock(return_value=None)):
self.assertIsNone(self.p.checkpoint())
self.assertEqual(self.p.checkpoint(timeout=10), 'not accessible or not healty')
self.assertEqual(self.p.checkpoint(timeout=10), 'not accessible or not healthy')
@patch('patroni.postgresql.config.mtime', mock_mtime)
@patch('patroni.postgresql.config.ConfigHandler._get_pg_settings')
+1 -1
View File
@@ -264,7 +264,7 @@ class QuorumTest(unittest.TestCase):
self.check_state_transitions(leader=leader, quorum=2, voters=set('bcde'),
numsync=2, sync=set('bcde'), numsync_confirmed=2, active=set('bcd'),
sync_wanted=3, leader_wanted=leader, expected=[
# node e removed from sync wth replication factor increase
# node e removed from sync with replication factor increase
('sync', leader, 3, set('bcd')),
# node e removed from voters with quorum decrease
('quorum', leader, 1, set('bcd')),
+2 -2
View File
@@ -235,7 +235,7 @@ class TestValidator(unittest.TestCase):
self.assertEqual(['consul.host', 'etcd.host', 'postgresql.bin_dir', 'postgresql.data_dir', 'postgresql.listen',
'raft.bind_addr', 'raft.self_addr', 'restapi.connect_address'], parse_output(output))
def test_bin_dir_is_empty_string_excutables_in_path(self, mock_out, mock_err):
def test_bin_dir_is_empty_string_executables_in_path(self, mock_out, mock_err):
binaries.extend(required_binaries)
c = copy.deepcopy(config)
c["postgresql"]["bin_dir"] = ""
@@ -259,7 +259,7 @@ class TestValidator(unittest.TestCase):
self.assertEqual(['raft.bind_addr', 'raft.self_addr'], parse_output(output))
@patch('subprocess.check_output', Mock(return_value=b"postgres (PostgreSQL) 12.1"))
def test_pg_version_missmatch(self, mock_out, mock_err):
def test_pg_version_mismatch(self, mock_out, mock_err):
directories.append(config["postgresql"]["data_dir"])
directories.append(config["postgresql"]["bin_dir"])
directories.append(os.path.join(config["postgresql"]["data_dir"], "pg_wal"))