def test_script_path(self) -> None:
     self.assertEqual(CiArgs().script_path, self.CI_SH)
 def test_component_command_with_snapshot(self) -> None:
     self.assertEqual(
         CiArgs().component_command("component"),
         f"{self.CI_SH} {self.OPENSEARCH_MANIFEST} --component component --snapshot",
     )
 def test_component(self) -> None:
     self.assertEqual(CiArgs().components, ["xyz"])
 def test_components(self) -> None:
     self.assertEqual(CiArgs().components, ["foo", "bar"])
 def test_snapshot_true(self) -> None:
     self.assertTrue(CiArgs().snapshot)
 def test_component_default(self) -> None:
     self.assertIsNone(CiArgs().components)
 def test_keep_true(self) -> None:
     self.assertTrue(CiArgs().keep)
 def test_snapshot_default(self) -> None:
     self.assertFalse(CiArgs().snapshot)
 def test_keep_default(self) -> None:
     self.assertFalse(CiArgs().keep)
 def test_manifest(self) -> None:
     self.assertEqual(CiArgs().manifest.name,
                      TestCiArgs.OPENSEARCH_MANIFEST)
Example #11
0
def main() -> int:
    args = CiArgs()
    console.configure(level=args.logging_level)
    CiManifests.from_file(args.manifest, args).check()
    return 0
Example #12
0
 def test_component_command(self):
     self.assertEqual(
         CiArgs().component_command("component"),
         f"{self.CI_SH} {self.OPENSEARCH_MANIFEST} --component component",
     )
Example #13
0
 def test_component(self):
     self.assertEqual(CiArgs().component, "xyz")