Skip to content

Add focused unit tests for libvirt image management#3093

Merged
stevenhorsman merged 1 commit into
confidential-containers:mainfrom
chathuryaadapa:libvirt-tests-image
Jun 2, 2026
Merged

Add focused unit tests for libvirt image management#3093
stevenhorsman merged 1 commit into
confidential-containers:mainfrom
chathuryaadapa:libvirt-tests-image

Conversation

@chathuryaadapa

Copy link
Copy Markdown
Contributor

Implements comprehensive yet focused unit tests for the inMemoryImage implementation in the libvirt provider.

Tests cover:

  • Image creation from byte arrays (text, empty, binary data)
  • Size calculation functionality
  • String representation
  • Import operations with success and error handling

Test coverage:

  • TestInMemoryImage: Validates creation, size(), and string() methods
  • TestInMemoryImageImport: Tests importImage with various scenarios

Assisted-by: IBM Bob noreply@ibm.com

@chathuryaadapa
chathuryaadapa requested a review from a team as a code owner May 25, 2026 08:00
Comment thread src/cloud-providers/libvirt/image_test.go
Comment thread src/cloud-providers/libvirt/image_test.go Outdated

@stevenhorsman stevenhorsman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Implements comprehensive yet focused unit tests for the inMemoryImage
implementation in the libvirt provider.

Tests cover:
- Image creation from byte arrays (text, empty, binary data)
- Size calculation functionality
- String representation
- Import operations with success and error handling

Test coverage:
- TestInMemoryImage: Validates creation, size(), and string() methods
- TestInMemoryImageImport: Tests importImage with various scenarios

Signed-off-by: Chathurya Adapa <Adapa.Chathurya1@ibm.com>
Assisted-by: IBM Bob <noreply@ibm.com>
@mkulke
mkulke force-pushed the libvirt-tests-image branch from b14db69 to 9a276be Compare June 2, 2026 09:09
@stevenhorsman
stevenhorsman merged commit eb835da into confidential-containers:main Jun 2, 2026
25 checks passed
@chathuryaadapa
chathuryaadapa deleted the libvirt-tests-image branch June 4, 2026 13:10
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.

3 participants