summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cirrus.yml36
-rwxr-xr-xcontrib/cirrus/runner.sh4
-rwxr-xr-xcontrib/cirrus/setup_environment.sh1
-rw-r--r--pkg/api/handlers/compat/images.go5
4 files changed, 37 insertions, 9 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 159f9ea12..c2238c3c6 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -407,6 +407,7 @@ docker-py_test_task:
main_script: *main
always: *artifacts
+
# Does exactly what it says, execute the podman unit-tests on all primary
# platforms and release versions.
unit_test_task:
@@ -425,6 +426,30 @@ unit_test_task:
main_script: *main
always: *artifacts
+
+apiv2_test_task:
+ name: "APIv2 test on $DISTRO_NV"
+ alias: apiv2_test
+ depends_on:
+ - validate
+ gce_instance: *standardvm
+ env:
+ <<: *stdenvars
+ TEST_FLAVOR: apiv2
+ clone_script: *noop # Comes from cache
+ gopath_cache: *ro_gopath_cache
+ setup_script: *setup
+ main_script: *main
+ always: &logs_artifacts
+ <<: *artifacts
+ package_versions_script: '$SCRIPT_BASE/logcollector.sh packages'
+ ginkgo_node_logs_script: '$SCRIPT_BASE/logcollector.sh ginkgo'
+ df_script: '$SCRIPT_BASE/logcollector.sh df'
+ audit_log_script: '$SCRIPT_BASE/logcollector.sh audit'
+ journal_script: '$SCRIPT_BASE/logcollector.sh journal'
+ podman_system_info_script: '$SCRIPT_BASE/logcollector.sh podman'
+
+
# Execute the podman integration tests on all primary platforms and release
# versions, as root, without involving the podman-remote client.
local_integration_test_task: &local_integration_test_task
@@ -445,14 +470,8 @@ local_integration_test_task: &local_integration_test_task
gopath_cache: *ro_gopath_cache
setup_script: *setup
main_script: *main
- always: &logs_artifacts
- <<: *artifacts
- package_versions_script: '$SCRIPT_BASE/logcollector.sh packages'
- ginkgo_node_logs_script: '$SCRIPT_BASE/logcollector.sh ginkgo'
- df_script: '$SCRIPT_BASE/logcollector.sh df'
- audit_log_script: '$SCRIPT_BASE/logcollector.sh audit'
- journal_script: '$SCRIPT_BASE/logcollector.sh journal'
- podman_system_info_script: '$SCRIPT_BASE/logcollector.sh podman'
+ always: *logs_artifacts
+
# Nearly identical to `local_integration_test` except all operations
# are performed through the podman-remote client vs a podman "server"
@@ -613,6 +632,7 @@ success_task:
- osx_alt_build
- docker-py_test
- unit_test
+ - apiv2_test
- local_integration_test
- remote_integration_test
- rootless_integration_test
diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh
index bfac8e7cb..b97a696d9 100755
--- a/contrib/cirrus/runner.sh
+++ b/contrib/cirrus/runner.sh
@@ -62,6 +62,10 @@ function _run_unit() {
make localunit
}
+function _run_apiv2() {
+ make localapiv2 |& logformatter
+}
+
function _run_int() {
dotest integration
}
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index 156c9b7b2..1b992711f 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -165,6 +165,7 @@ case "$TEST_FLAVOR" in
docker-py) ;&
build) make clean ;;
unit) ;;
+ apiv2) ;& # use next item
int) ;&
sys) ;&
bindings) ;&
diff --git a/pkg/api/handlers/compat/images.go b/pkg/api/handlers/compat/images.go
index f49ce59da..3431823bd 100644
--- a/pkg/api/handlers/compat/images.go
+++ b/pkg/api/handlers/compat/images.go
@@ -327,7 +327,10 @@ func GetImage(w http.ResponseWriter, r *http.Request) {
name := utils.GetName(r)
newImage, err := utils.GetImage(r, name)
if err != nil {
- utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Wrapf(err, "failed to find image %s", name))
+ // Here we need to fiddle with the error message because docker-py is looking for "No
+ // such image" to determine on how to raise the correct exception.
+ errMsg := strings.ReplaceAll(err.Error(), "no such image", "No such image")
+ utils.Error(w, "Something went wrong.", http.StatusNotFound, errors.Errorf("failed to find image %s: %s", name, errMsg))
return
}
inspect, err := handlers.ImageDataToImageInspect(r.Context(), newImage)