Exemplo n.º 1
0
    def test_opensearch(self) -> None:
        location = BundleFileLocation("dir", "opensearch")

        self.assertEqual(location.get_bundle_location("sql"),
                         os.path.join("dir", "dist", "opensearch", "sql"))
        self.assertEqual(location.get_build_location("sql"),
                         os.path.join("dir", "builds", "opensearch", "sql"))
Exemplo n.º 2
0
    def setUp(self) -> None:
        self.maxDiff = None
        manifest_path = os.path.join(os.path.dirname(__file__), "data",
                                     "opensearch-build-linux-1.1.0.yml")
        self.manifest = BuildManifest.from_path(manifest_path)
        self.bundle_recorder = BundleRecorder(
            self.manifest.build, "output_dir", "artifacts_dir",
            BundleFileLocation("bundle_output_dir", "opensearch", "tar"))

        manifest_distribution_path = os.path.join(
            os.path.dirname(__file__), "data",
            "opensearch-build-windows-1.3.0.yml")
        self.manifest_distribution = BuildManifest.from_path(
            manifest_distribution_path)
        self.bundle_recorder_distribution = BundleRecorder(
            self.manifest_distribution.build, "output_dir", "artifacts_dir",
            BundleFileLocation("bundle_output_dir", "opensearch", "tar"))
Exemplo n.º 3
0
 def setUp(self) -> None:
     manifest_path = os.path.join(os.path.dirname(__file__), "data", "opensearch-dashboards-build-1.1.0.yml")
     self.manifest = BuildManifest.from_path(manifest_path)
     self.bundle_recorder = BundleRecorder(
         self.manifest.build,
         "output_dir",
         "artifacts_dir",
         BundleFileLocation("bundle_output_dir", "opensearch-dashboards")
     )
Exemplo n.º 4
0
 def from_path(cls, url_path: str, file_path: str,
               filename: str) -> BundleLocation:
     return BundleUrlLocation(url_path,
                              filename) if url_path else BundleFileLocation(
                                  file_path, filename)