spiegel_podman/test/e2e
Daniel J Walsh 6405925f79
Add artifact fallback to podman inspect command
This commit implements automatic artifact fallback for the podman inspect command
as requested in GitHub issue #27075.

Changes made:
- Add ArtifactType constant to cmd/podman/common/inspect.go
- Update AutocompleteInspectType to include artifact type in completions
- Add artifact case to main inspect switch statement for explicit --type artifact
- Implement artifact fallback in inspectAll function for automatic detection
- Update shell completion to recognize artifacts in getEntityType function
- Update command help text, usage, and examples to include artifacts
- Update podman-inspect.1.md man page with artifact documentation
- Add comprehensive e2e tests for artifact inspect functionality

The inspect command now automatically falls back to artifact inspection when
no container, image, volume, network, or pod matches the specified name.
Users can also explicitly use --type artifact for direct artifact inspection.

This maintains backward compatibility while extending functionality to support
the artifact object type seamlessly.

Examples:
  podman inspect myartifact                        # Auto-detects artifact
  podman inspect --type artifact myartifact       # Explicit artifact type
  podman inspect --format '{{.Name}}' myartifact  # Format support

Fixes: https://github.com/containers/podman/issues/27075
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
2025-10-02 06:52:32 -04:00
..
build prune: support clearing build cache using CleanCacheMount 2024-09-05 10:40:07 -07:00
cdi build(deps): bump github.com/container-orchestrated-devices/container-device-interface 2023-02-20 14:51:04 +01:00
config Read kube_generate_type from containers.conf 2023-04-11 09:15:05 -04:00
quadlet Quadlet build - consider File path that starts with a systemd specifier as absolute 2025-09-09 13:57:36 -04:00
sign e2e: reduce dependency on /tmp for e2e tests 2023-01-26 22:20:15 +09:00
testdata CI: e2e: use distinct ports, not just 5000 2024-02-27 04:30:26 -07:00
artifact_created_test.go Add creation timestamp to podman artifacts 2025-09-25 08:39:28 -04:00
artifact_mount_test.go feat: add Podman artifact support to Go bindings and remote clients 2025-08-01 00:10:50 +10:00
artifact_test.go Merge pull request #27159 from nothiaki/artifact-list-virtual-size 2025-09-29 14:29:03 +00:00
attach_test.go Use PodmanExitCleanly in attach_test.go 2025-01-09 18:47:37 +01:00
build_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
buildx_inspect_test.go podman buildx inspect support 2025-06-03 11:07:08 -04:00
checkpoint_image_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
checkpoint_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
cleanup_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
commit_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
common_test.go Implement TLS API Support 2025-09-26 09:09:54 -06:00
config.go test/e2e: fix unused linter warning 2025-03-31 12:30:43 -07:00
config_amd64.go ci: rm allow-unused from nolintlint settings 2025-03-31 12:27:55 -07:00
config_arm64.go Fix directive //nolint:revive is unused for linter "revive" on ARM 2025-04-16 16:17:28 +02:00
config_ppc64le.go pasta udp tests: new bytecheck helper 2024-10-16 10:15:19 -06:00
config_test.go test/e2e: fix unused linter warning 2025-03-31 12:30:43 -07:00
container_clone_test.go Fix container clone with configured Healthcheck 2025-03-26 11:01:18 +01:00
container_create_volume_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
container_iface_name_test.go Bump VMs. ShellCheck is now built-in 2024-09-09 06:16:20 -06:00
container_inspect_test.go Add ExposedPorts to Inspect's ContainerConfig 2024-10-01 07:54:52 -04:00
containers_conf_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
cp_test.go Fix a potential deadlock during podman cp 2025-03-14 10:37:59 -04:00
create_staticip_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
create_staticmac_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
create_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
diff_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
events_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
exec_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
exists_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
export_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
farm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
generate_kube_test.go Fix QF1003: could use tagged switch" staticcheck warning 2025-03-31 12:27:55 -07:00
generate_spec_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
generate_systemd_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
healthcheck_run_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
history_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
image_scp_test.go Implement TLS API Support 2025-09-26 09:09:54 -06:00
image_sign_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
images_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
import_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
info_test.go Implement TLS API Support 2025-09-26 09:09:54 -06:00
init_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
inspect_test.go Add artifact fallback to podman inspect command 2025-10-02 06:52:32 -04:00
kill_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
libpod_suite_remote_test.go Implement TLS API Support 2025-09-26 09:09:54 -06:00
libpod_suite_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
load_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
login_logout_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
logs_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
manifest_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
mount_rootless_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
mount_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
negative_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
network_connect_disconnect_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
network_create_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
network_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
pause_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
play_build_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
play_kube_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
pod_clone_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_create_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
pod_infra_container_test.go bump go to 1.22 2024-09-03 15:14:15 +02:00
pod_initcontainers_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_inspect_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_kill_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_pause_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_pod_namespaces_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_prune_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_ps_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
pod_restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_rm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_start_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_stats_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
pod_stop_test.go Refactor graph traversal & use for pod stop 2025-02-06 18:28:12 -05:00
pod_top_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
port_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
prune_test.go Output headers for volume ls when empty 2025-04-21 17:07:57 -05:00
ps_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
pull_chunked_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
pull_test.go Revert "test/e2e: try debug potential pasta issue" 2025-09-15 19:28:41 +02:00
push_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
quadlet_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
rename_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
rm_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
rmi_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
run_aardvark_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_apparmor_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
run_cgroup_parent_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_cleanup_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
run_cpu_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_device_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
run_dns_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_entrypoint_test.go oci: report empty exec path as ENOENT 2025-02-18 22:01:08 +01:00
run_env_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_exit_test.go oci: report empty exec path as ENOENT 2025-02-18 22:01:08 +01:00
run_memory_test.go bump go to 1.22 2024-09-03 15:14:15 +02:00
run_networking_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
run_ns_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_passwd_test.go libpod: --user works with --hostuser entries 2025-04-07 18:11:06 +02:00
run_privileged_test.go Switch to moby/sys/capability 2024-10-01 12:52:18 -07:00
run_restart_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_seccomp_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_security_labels_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_selinux_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
run_signal_test.go test/e2e: fix default signal exit code test 2024-10-15 15:17:50 +02:00
run_staticip_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
run_test.go test: remove outdated skip in podman run check personality support test 2025-10-01 15:12:43 +09:00
run_transient_test.go Don't use all of tempdir as podman's --tmpdir 2025-02-05 22:52:46 +01:00
run_userns_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
run_volume_test.go do not pass [no]copy as bind mounts options to runtime 2025-09-01 12:48:43 +02:00
run_working_dir_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
runlabel_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
save_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
search_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
secret_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
start_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
stats_test.go run modernize -fix ./... 2025-09-10 16:17:04 +02:00
stop_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
system_connection_test.go lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
system_df_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
system_dial_stdio_test.go test/system: remove system dial-stdio test 2024-12-17 17:04:17 +01:00
system_reset_test.go Output headers for volume ls when empty 2025-04-21 17:07:57 -05:00
systemd_activate_test.go Pass all of PodmanExecOptions to various [mM]akeOptions functions 2025-01-23 00:03:52 +01:00
systemd_test.go Merge pull request #23650 from Luap99/e2e-systemd-rm 2024-08-19 13:21:26 +00:00
tag_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
toolbox_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
top_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
tree_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
trust_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
unshare_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
untag_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
update_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
version_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_create_test.go Merge pull request #26434 from mheon/import_export 2025-06-25 19:48:14 +00:00
volume_exists_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
volume_inspect_test.go golangci-lint: make windows linting happy 2024-08-19 11:41:29 +02:00
volume_ls_test.go Output headers for volume ls when empty 2025-04-21 17:07:57 -05:00
volume_plugin_test.go test: remove hack workaround in 'use plugin in containers' 2025-09-22 13:56:43 +09:00
volume_prune_test.go Output headers for volume ls when empty 2025-04-21 17:07:57 -05:00
volume_rm_test.go Fix SQLite volume lookup queries matching too liberally 2025-05-28 13:10:10 -04:00
wait_test.go Fixes: #26691 2025-08-06 22:34:18 +03:00