fix: use StaticNetworkUnikernelIP constant in httpStaticNetTest#67
Open
mdryaan wants to merge 1 commit into
Open
fix: use StaticNetworkUnikernelIP constant in httpStaticNetTest#67mdryaan wants to merge 1 commit into
mdryaan wants to merge 1 commit into
Conversation
Signed-off-by: Md Raiyan <alikhurshid842001@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
httpStaticNetTestintests/e2e/test_functions.goderived the unikernel's IP address by splitting the tap device's IPv4 and hardcoding.2as the last octet.constants.StaticNetworkUnikernelIP(172.16.1.2) already defines this value.This removes the tap interface lookup, address iteration, and IP recomputation entirely, replacing them with a direct use of the constant. Also removes the commented-out
net/httpblock (lines 420–434) that was never resolved. Thenow-unused imports
"net"and"github.com/asaskevich/govalidator"are dropped;"github.com/urunc-dev/urunc/internal/constants"is added.Related issues
httpStaticNetTesthardcodes unikernel IP offset and contains unresolved dead code #66How was this tested?
tests/e2e/test_functions.gois the only file changed. The tap-finding and IP derivation block (lines 371–407) is replaced withurl := fmt.Sprintf("http://%s:8080", constants.StaticNetworkUnikernelIP). The commented-out block (lines 420–434) is removed.golangci-lint run -v --timeout=5m— 0 new issues.make unittest— all pass.make— builds cleanly.Full e2e verification requires a Firecracker + Unikraft environment running the
make— builds cleanly.Full e2e verification requires a Firecracker + Unikraft environment running the
Firecracker-unikraft-httpreply-static-nettest case.LLM usage
N/A
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).