-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added unit test for skopeo util, removed test action from make (that …
…does not use container), added action to both build and run tests in test container
- Loading branch information
1 parent
3d2fe90
commit 0a7f3cd
Showing
4 changed files
with
50 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Vessel Diff Tool | ||
# | ||
# Copyright 2024 Carnegie Mellon University. | ||
# | ||
# NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING | ||
# INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON | ||
# UNIVERSITY MAKES NO WARRANTIES OF ANY KIND, EITHER EXPRESSED OR IMPLIED, | ||
# AS TO ANY MATTER INCLUDING, BUT NOT LIMITED TO, WARRANTY OF FITNESS | ||
# FOR PURPOSE OR MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM | ||
# USE OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE ANY | ||
# WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM PATENT, TRADEMARK, | ||
# OR COPYRIGHT INFRINGEMENT. | ||
# | ||
# Licensed under a MIT (SEI)-style license, please see license.txt | ||
# or contact [email protected] for full terms. | ||
# | ||
# [DISTRIBUTION STATEMENT A] This material has been approved for public | ||
# release and unlimited distribution. Please see Copyright notice | ||
# for non-US Government use and distribution. | ||
# | ||
# This Software includes and/or makes use of Third-Party Software | ||
# each subject to its own license. | ||
# | ||
# DM24-1321 | ||
|
||
|
||
from pathlib import Path | ||
|
||
from vessel.utils.skopeo import skopeo_copy | ||
from vessel.utils.uri import ImageURI | ||
|
||
|
||
def test_skopeo_copy(tmp_path: Path): | ||
"""Tests that method to copy image through skopeo works.""" | ||
|
||
# Sample image in Docker hub | ||
test_image_name = "hello-world:latest" | ||
test_image_uri = ImageURI(f"docker://{test_image_name}") | ||
|
||
dest_path = skopeo_copy(test_image_uri, str(tmp_path)) | ||
|
||
assert dest_path == f"{tmp_path}/{test_image_name.replace(':', '.')}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters