Exemplo n.º 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))
Exemplo n.º 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)
     )
Exemplo n.º 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))
Exemplo n.º 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))
Exemplo n.º 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)
     )
Exemplo n.º 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
         )
     )