def postprocess(self):
        super(deferred_deletion, self).postprocess()
        mustpass(self.stuff['result'])

        # Helper script should be silent; treat any output as a warning
        if self.stuff['result'].stdout:
            self.logwarning(self.stuff['result'].stdout)
    def postprocess(self):
        super(deferred_deletion, self).postprocess()
        mustpass(self.stuff['result'])

        # Helper script should be silent; treat any output as a warning
        if self.stuff['result'].stdout:
            self.logwarning(self.stuff['result'].stdout)
示例#3
0
 def run_once(self):
     super(puller, self).run_once()
     # Using parent instance's stuff, not sub_stuff for simplicity
     for fqin in self.parent_subtest.stuff['fqins']:
         if not fqin:
             continue
         self.loginfo("Pulling %s", fqin)
         # TODO: Support pulling/verifying with atomic command
         mustpass(DockerCmd(self, 'pull', [fqin]).execute())
 def run_once(self):
     super(puller, self).run_once()
     # Using parent instance's stuff, not sub_stuff for simplicity
     for fqin in self.parent_subtest.stuff['fqins']:
         if not fqin:
             continue
         self.loginfo("Pulling %s", fqin)
         # TODO: Support pulling/verifying with atomic command
         mustpass(DockerCmd(self, 'pull', [fqin]).execute())
示例#5
0
 def run_once(self):
     super(builder, self).run_once()
     if None in self.parent_subtest.stuff['build']:
         return
     subopts = get_as_list(self.config.get('build_opts_csv', []))
     stuff = self.parent_subtest.stuff
     # Someday we might support building more than one
     for name, dockerfile in list(stuff['build'].items()):
         this_subopts = subopts + ['-t', name, dockerfile]
         mustpass(DockerCmd(self, 'build', this_subopts).execute())
         stuff['fqins'] += list(stuff['build'].keys())
 def run_once(self):
     super(builder, self).run_once()
     if None in self.parent_subtest.stuff['build']:
         return
     subopts = get_as_list(self.config.get('build_opts_csv', []))
     stuff = self.parent_subtest.stuff
     # Someday we might support building more than one
     for name, dockerfile in stuff['build'].items():
         this_subopts = subopts + ['-t', name, dockerfile]
         mustpass(DockerCmd(self, 'build', this_subopts).execute())
         stuff['fqins'] += stuff['build'].keys()
示例#7
0
 def _container_log(self):
     """
     Returns container log as a list of strings
     """
     c_name = self.stuff['container_name']
     result = mustpass(DockerCmd(self, "logs", [c_name]).execute())
     return result.stdout.strip().split("\n")
示例#8
0
 def _container_log(self):
     """
     Returns container log as a list of strings
     """
     c_name = self.stuff['container_name']
     result = mustpass(DockerCmd(self, "logs", [c_name]).execute())
     return result.stdout.strip().split("\n")
示例#9
0
    def postprocess(self):
        super(run_install, self).postprocess()

        name = self.sub_stuff['name']
        # ancestor method must have been successful
        self.sub_stuff['containers'].append(name)

        # images with same names as containers are confusing
        eman = name[-1::-1]  # the name, backwards
        mustpass(DockerCmd(self, 'commit',
                           [name, "%s:latest" % eman]).execute())
        # mustpass() was successful
        self.sub_stuff['images'].append(name)

        eman = name[-1::-1]  # committed image
        subargs = ['-i', '--rm', eman, self.config['verify_cmd']]
        mustpass(DockerCmd(self, 'run', subargs).execute())
 def postprocess(self):
     super(systemd_in_container, self).postprocess()
     mustpass(self.stuff['result'])
 def postprocess(self):
     super(systemd_in_container, self).postprocess()
     mustpass(self.stuff['result'])
 def postprocess(self):
     super(selinux_labels, self).postprocess()
     mustpass(self.stuff['result'])
 def postprocess(self):
     super(selinux_labels, self).postprocess()
     mustpass(self.stuff['result'])