Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests] test_corrupt_backup_content was updated [typos, new asserts] #633

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dmitry-lipetsk
Copy link

New names:
full2_id [was fulle2_id]
full1_conf_file [was fulle1_conf_file]
full2_conf_file [was fulle2_conf_file]

New asserts:

  • self.show_pb(backup_dir, 'node', full1_id)['status'] is 'CORRUPT'
  • self.show_pb(backup_dir, 'node', full2_id)['status'] is 'OK'

New names:
 full2_id [was fulle2_id]
 full1_conf_file [was fulle1_conf_file]
 full2_conf_file [was fulle2_conf_file]

New asserts:
 - self.show_pb(backup_dir, 'node', full1_id)['status'] is 'CORRUPT'
 - self.show_pb(backup_dir, 'node', full2_id)['status'] is 'OK'
@@ -107,7 +107,8 @@ def test_corrupt_backup_content(self):
"\n Unexpected Error Message: {0}\n CMD: {1}".format(
repr(e.message), self.cmd))

self.show_pb(backup_dir, 'node', full1_id)['status']
self.assertEqual(self.show_pb(backup_dir, 'node', full1_id)['status'], 'CORRUPT')
self.assertEqual(self.show_pb(backup_dir, 'node', full2_id)['status'], 'OK')

self.assertEqual(self.show_pb(backup_dir, 'node')[0]['status'], 'CORRUPT')
Copy link
Author

@dmitry-lipetsk dmitry-lipetsk Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want, I can replace last two lines with something like this, too:

        info = self.show_pb(backup_dir, 'node')
        self.assertIsNotNone(info)
        self.assertEqual(len(info), 2)
        self.assertIsNotNone(info[0])
        self.assertIsNotNone(info[1])
        self.assertIn('status', info[0].keys())
        self.assertIn('status', info[1].keys())
        self.assertEqual(info[0]['status'], 'CORRUPT')
        self.assertEqual(info[1]['status'], 'OK')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant