Ejemplo n.º 1
0
 def push_reports(self, cib_old=None, cib_new=None):
     # No test changes the CIB between load and push. The point is to test
     # loading and pushing, not editing the CIB.
     loaded_cib = self.config.calls.get("runner.cib.load").stdout
     return [
         fixture.debug(
             report_codes.TMP_FILE_WRITE,
             file_path=self.tmpfile_old.name,
             content=(cib_old if cib_old is not None else loaded_cib)),
         fixture.debug(report_codes.TMP_FILE_WRITE,
                       file_path=self.tmpfile_new.name,
                       content=(cib_new if cib_new is not None else
                                loaded_cib).strip()),
     ]
Ejemplo n.º 2
0
 def push_reports(self, cib_old=None, cib_new=None):
     # No test changes the CIB between load and push. The point is to test
     # loading and pushing, not editing the CIB.
     loaded_cib = self.config.calls.get("runner.cib.load").stdout
     return [
         fixture.debug(
             report_codes.TMP_FILE_WRITE,
             file_path=self.tmpfile_old.name,
             content=(cib_old if cib_old is not None else loaded_cib)
         ),
         fixture.debug(
             report_codes.TMP_FILE_WRITE,
             file_path=self.tmpfile_new.name,
             content=(cib_new if cib_new is not None else loaded_cib).strip()
         ),
     ]