def test_load_from_dump(self): input_data = { "dockerfile_images": { "original_parents": ["scratch"], "local_parents": [], "source_registry": None, "organization": None, }, "plugins_results": { "plugin_1": "result" }, "tag_conf": { "floating_images": [ ImageName.parse("registry/httpd:2.4").to_str(), ], }, } wf_data = ImageBuildWorkflowData.load(input_data) expected_df_images = DockerfileImages.load( input_data["dockerfile_images"]) assert expected_df_images == wf_data.dockerfile_images assert input_data["plugins_results"] == wf_data.plugins_results assert TagConf.load(input_data["tag_conf"]) == wf_data.tag_conf
def test_parse_images(self, input_data, expected_primary_images, expected_unique_images, expected_floating_images): tag_conf = TagConf.load(input_data) assert expected_primary_images == tag_conf.primary_images assert expected_unique_images == tag_conf.unique_images assert expected_floating_images == tag_conf.floating_images