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), )
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"])
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"])