Exemple #1
0
 def test_wrong_format_invalid_date(self):
     with self.assertRaises(ValueError):
         is_index_expired("{self.topic-name}-2020.13.01", self.cluster_mock)
Exemple #2
0
 def test_wrong_format_no_date(self):
     with self.assertRaises(ValueError):
         is_index_expired("test", self.cluster_mock)
Exemple #3
0
 def test_not_expired(self):
     self.assertFalse(
         is_index_expired(f"{self.topic_name}-2020.01.03",
                          self.cluster_mock))
Exemple #4
0
 def test_index_name(self):
     is_index_expired(f"{self.topic_name}-2020.01.03", self.cluster_mock)
     self.cluster_mock.get_log_retention_days.assert_called_with(
         self.topic_name)
Exemple #5
0
 def test_expired(self):
     self.assertTrue(
         is_index_expired(f"{self.topic_name}-2020.01.02",
                          self.cluster_mock))