def workflow(self, push=True, sync=True, build_process_failed=False, postbuild_results=None, prebuild_results=None, expectv2schema2=False, platform_descriptors=False): tag_conf = TagConf() tag_conf.add_unique_image(self.TEST_UNIQUE_IMAGE) push_conf = PushConf() if push: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=False) if sync: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=True) conf = { ReactorConfigKeys.VERSION_KEY: 1, 'prefer_schema1_digest': not expectv2schema2 } if platform_descriptors: conf['platform_descriptors'] = [ {'platform': 'x86_64', 'architecture': 'amd64'}, ] plugin_workspace = { ReactorConfigPlugin.key: { WORKSPACE_CONF_KEY: ReactorConfig(conf) } } mock_get_retry_session() builder = flexmock() setattr(builder, 'image_id', 'sha256:(old)') return flexmock(tag_conf=tag_conf, push_conf=push_conf, builder=builder, build_process_failed=build_process_failed, plugin_workspace=plugin_workspace, postbuild_results=postbuild_results or {}, prebuild_results=prebuild_results or {})
def workflow(self, push=True, sync=True, build_process_failed=False, postbuild_results=None, prebuild_results=None, expectv2schema2=False, platform_descriptors=False): tag_conf = TagConf() tag_conf.add_unique_image(self.TEST_UNIQUE_IMAGE) push_conf = PushConf() if push: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=False) if sync: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=True) conf = { ReactorConfigKeys.VERSION_KEY: 1, 'prefer_schema1_digest': not expectv2schema2 } if platform_descriptors: conf['platform_descriptors'] = [ {'platform': 'x86_64', 'architecture': 'amd64'}, ] plugin_workspace = { ReactorConfigPlugin.key: { WORKSPACE_CONF_KEY: ReactorConfig(conf) } } mock_get_retry_session() builder = flexmock() setattr(builder, 'image_id', 'sha256:(old)') return flexmock(tag_conf=tag_conf, push_conf=push_conf, builder=builder, build_process_failed=build_process_failed, plugin_workspace=plugin_workspace, postbuild_results=postbuild_results or {}, prebuild_results=prebuild_results or {})
def workflow(self): tag_conf = TagConf() tag_conf.add_unique_image(self.TEST_UNIQUE_IMAGE) push_conf = PushConf() push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI) builder = flexmock() setattr(builder, 'image_id', 'sha256:(old)') return flexmock(tag_conf=tag_conf, push_conf=push_conf, builder=builder, plugin_workspace={})
def workflow(self, push=True, sync=True, build_process_failed=False): tag_conf = TagConf() tag_conf.add_unique_image(self.TEST_UNIQUE_IMAGE) push_conf = PushConf() if push: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=False) if sync: push_conf.add_pulp_registry('pulp', crane_uri=self.CRANE_URI, server_side_sync=True) mock_get_retry_session() builder = flexmock() setattr(builder, 'image_id', 'sha256:(old)') return flexmock(tag_conf=tag_conf, push_conf=push_conf, builder=builder, build_process_failed=build_process_failed, plugin_workspace={})