X-Git-Url: https://code.grnet.gr/git/ganeti-local/blobdiff_plain/75a5f45659847d623c83f3cf2e2fbbf8e621b15b..560cbec10debba6db50bb357aae19958bbd72808:/test/mocks.py diff --git a/test/mocks.py b/test/mocks.py index cfff9c2..4c0ae07 100644 --- a/test/mocks.py +++ b/test/mocks.py @@ -42,16 +42,9 @@ class FakeConfig: def GetNodeList(self): return ["a", "b", "c"] - def GetMaster(self): - return utils.HostInfo().name - def GetHostKey(self): return FAKE_CLUSTER_KEY - -class FakeSStore: - """Fake simplestore object""" - def GetClusterName(self): return "test.cluster" @@ -62,8 +55,20 @@ class FakeSStore: class FakeProc: """Fake processor object""" - def LogWarning(self, msg): + def LogWarning(self, msg, *args, **kwargs): pass - def LogInfo(self, msg): + def LogInfo(self, msg, *args, **kwargs): pass + + def LogStep(self, current, total, message): + pass + + +class FakeContext: + """Fake context object""" + + def __init__(self): + self.cfg = FakeConfig() + # TODO: decide what features a mock Ganeti Lock Manager must have + self.GLM = None