Skip to content

Add more Netavark create tests#1431

Merged
Luap99 merged 4 commits intocontainers:mainfrom
ashley-cui:create
Apr 15, 2026
Merged

Add more Netavark create tests#1431
Luap99 merged 4 commits intocontainers:mainfrom
ashley-cui:create

Conversation

@ashley-cui
Copy link
Copy Markdown
Member

@ashley-cui ashley-cui commented Apr 7, 2026

Asked Claude to adapt missing tests from container-libs/common/libnetwork/netavark/create.go for more test coverage. In the process, it found two differences in validation, so now we validate subnet overlap and auto-detect ipv6 networks.

Comment thread src/network/create_config/validation.rs Outdated
Comment thread test/700-create.bats Outdated
Adapted from container-libs/common/libnetwork/netavark/config_test.go using agentic AI, for more test coverage.

Signed-off-by: Ashley Cui <acui@redhat.com>
Automatically set ipv6_enabled=true when any subnet in the network is IPv6.
This matches the behavior of the Go implementation in container-libs.

Signed-off-by: Ashley Cui <acui@redhat.com>
@ashley-cui ashley-cui force-pushed the create branch 2 times, most recently from f474751 to 99d91f1 Compare April 14, 2026 18:58
@packit-as-a-service
Copy link
Copy Markdown

Ephemeral COPR build failed. @containers/packit-build please check.

1 similar comment
@packit-as-a-service
Copy link
Copy Markdown

Ephemeral COPR build failed. @containers/packit-build please check.

Validate that subnets within the same network do not overlap or duplicate
each other. This matches the behavior of the Go implementation.

Signed-off-by: Ashley Cui <acui@redhat.com>
These fields cannot be changed.

Signed-off-by: Ashley Cui <acui@redhat.com>
Copy link
Copy Markdown
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@Luap99 Luap99 merged commit 97c0116 into containers:main Apr 15, 2026
27 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.

2 participants