示例#1
0
    def setUp(self):
        super().setUp()
        self.patch_object(trilio_dm.hookenv, "config")
        self.patch_object(trilio_dm.host, "mounts")
        self.patch_object(trilio_dm.host, "mount")
        self.patch_object(trilio_dm.os.path, "exists")
        self.patch_object(trilio_dm.os, "mkdir")

        self.trilio_wlm_charm = trilio_dm.TrilioDataMoverCharm()
        self._nfs_path = os.path.join(
            trilio_dm.TV_MOUNTS,
            self.trilio_wlm_charm._encode_endpoint(self._nfs_shares),
        )
        self._ghost_path = os.path.join(
            trilio_dm.TV_MOUNTS,
            self.trilio_wlm_charm._encode_endpoint(self._ghost_shares),
        )
示例#2
0
 def test_services_s3(self):
     dm_charm = trilio_dm.TrilioDataMoverCharm()
     self.patch_object(trilio_dm.hookenv, "config")
     self.config.return_value = "s3"
     self.assertEqual(dm_charm.services,
                      ["tvault-contego", "tvault-object-store"])
示例#3
0
 def test_packages_py3(self):
     dm_charm = trilio_dm.TrilioDataMoverCharm()
     self.patch_object(trilio_dm.hookenv, "config")
     self.config.return_value = 3
     self.assertEqual(dm_charm.packages,
                      ["python3-tvault-contego", "nfs-common"])