Пример #1
0
 def test_all_snapshots_for_in_progress_negative(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.snapshots
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertFalse(
         curator.snapshot_in_progress(client,
                                      repository=testvars.repo_name))
Пример #2
0
 def test_all_snapshots_for_in_progress_negative(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.snapshots
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertFalse(
         curator.snapshot_in_progress(client, repository=testvars.repo_name)
     )
Пример #3
0
 def test_specified_snapshot_in_progress_negative(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.inprogress
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertFalse(
         curator.snapshot_in_progress(client,
                                      repository=testvars.repo_name,
                                      snapshot=testvars.snap_name))
Пример #4
0
 def test_all_snapshots_for_in_progress(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.inprogress
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertEqual(
         'snapshot-2015.03.01',
         curator.snapshot_in_progress(client,
                                      repository=testvars.repo_name))
Пример #5
0
 def test_all_snapshots_for_in_progress(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.inprogress
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertEqual(
         'snapshot-2015.03.01',
         curator.snapshot_in_progress(client, repository=testvars.repo_name)
     )
Пример #6
0
 def test_specified_snapshot_in_progress_negative(self):
     client = Mock()
     client.snapshot.get.return_value = testvars.inprogress
     client.snapshot.get_repository.return_value = testvars.test_repo
     self.assertFalse(
         curator.snapshot_in_progress(
             client, repository=testvars.repo_name,
             snapshot=testvars.snap_name
         )
     )