Exemplo n.º 1
0
 def test_unreachable(self):
     self.assert_message(
         messages.FilesDistributionSkipped(const.REASON_UNREACHABLE,
                                           ["file1", "file2"], ["nodeA"]),
         "Distribution of 'file1', 'file2' to 'nodeA' was skipped because "
         "pcs is unable to connect to the node(s). Please, distribute "
         "the file(s) manually.",
     )
Exemplo n.º 2
0
 def test_not_live(self):
     self.assert_message(
         messages.FilesDistributionSkipped(const.REASON_NOT_LIVE_CIB,
                                           ["file1"], ["nodeA", "nodeB"]),
         "Distribution of 'file1' to 'nodeA', 'nodeB' was skipped because "
         "the command does not run on a live cluster (e.g. -f was used). "
         "Please, distribute the file(s) manually.",
     )
Exemplo n.º 3
0
 def test_unknown_reason(self):
     self.assert_message(
         messages.FilesDistributionSkipped("some undefined reason",
                                           ["file1", "file2"],
                                           ["nodeA", "nodeB"]),
         "Distribution of 'file1', 'file2' to 'nodeA', 'nodeB' was skipped "
         "because some undefined reason. Please, distribute the file(s) "
         "manually.",
     )