Skip to content

Comments

integration: add containerd container handler tests#3818

Merged
dims merged 1 commit intogoogle:masterfrom
dims:add-containerd-integration-tests
Jan 16, 2026
Merged

integration: add containerd container handler tests#3818
dims merged 1 commit intogoogle:masterfrom
dims:add-containerd-integration-tests

Conversation

@dims
Copy link
Collaborator

@dims dims commented Jan 16, 2026

Add integration tests for the containerd container handler, similar to the existing Docker tests. This enables testing cAdvisor's containerd support in the k8s.io namespace used by Kubernetes.

Tests added:

  • TestContainerdContainerById
  • TestContainerdContainerByName
  • TestGetAllContainerdContainers
  • TestBasicContainerdContainer
  • TestContainerdContainerCpuStats
  • TestContainerdContainerMemoryStats
  • TestContainerdContainerSpec
  • TestContainerdContainerLabels
  • TestContainerdContainerCreationTime
  • TestContainerdContainerDiskIoStats
  • TestContainerdContainerImageInfo

Changes:

  • Add ContainerdActions interface to framework.go with Run, RunPause, and RunBusybox methods using ctr CLI
  • Install ctr CLI in integration.sh if not available
  • Set up cgroup v2 delegation for k8s.io namespace to enable container resource accounting

Add integration tests for the containerd container handler, similar to
the existing Docker tests. This enables testing cAdvisor's containerd
support in the k8s.io namespace used by Kubernetes.

Tests added:
- TestContainerdContainerById
- TestContainerdContainerByName
- TestGetAllContainerdContainers
- TestBasicContainerdContainer
- TestContainerdContainerCpuStats
- TestContainerdContainerMemoryStats
- TestContainerdContainerSpec
- TestContainerdContainerLabels
- TestContainerdContainerCreationTime
- TestContainerdContainerDiskIoStats
- TestContainerdContainerImageInfo

Changes:
- Add ContainerdActions interface to framework.go with Run, RunPause,
  and RunBusybox methods using ctr CLI
- Install ctr CLI in integration.sh if not available
- Set up cgroup v2 delegation for k8s.io namespace to enable container
  resource accounting

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
@dims dims merged commit 1b3e95c into google:master Jan 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant