Merged
Conversation
- Replace github.com/boltdb/bolt with go.etcd.io/bbolt - Update go.etcd.io/bbolt to v1.4.2 - Update github.com/spf13/pflag to v1.0.6 Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
…s/ptr - Remove custom ptr function and use k8s.io/utils/ptr instead - Update all pointer-related test cases to use the new ptr.To() function - This change improves code readability and reduces maintenance overhead Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add unit tests for ENI and ENIIP types in daemon package - Implement tests for GetResourceID, GetType, and ToResItems methods - Add unit tests for scheme registration and REST mapper - Test scope registration for cluster and namespaced resources Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Implement mock interface for testing - Add tests for GetInstanceMeta and Init functions - Verify ECS struct implements the Interface Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Implement multiple test cases to verify the behavior of storeRuntimeConfig function - Test scenarios include: - Handling Cilium and Terway plugins - Storing network policy provider and data path information - Error handling for invalid or missing plugin types - Testing with empty plugins list - Verifying load and save errors - Add test for isMounted function Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add a new context to test the setup of DummyReconciler - Create a new manager instance for testing - Verify that SetupWithManager does not return an error Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Implement mock handlers and resources for testing - Add tests for tracer registration, unregistration, and resource management - Verify event recording functionality - Validate resource mapping registration and retrieval Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add test file net_test.go to cmd/terway-cli - Implement unit tests for getNetInterfaces and getInterfaceByMAC functions - Use testify library for assertions Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add tests for gcPolicyRoutes, gcLeakedRules, gcRoutes, and gcTCFilters functions - Create mock network environments for testing using netlink and testutils- Validate garbage collection behavior for various scenarios, including: - Valid and invalid MAC addresses - Empty and non-empty links - Routes and filters to be collected - Handling of invalid IPs and nil values - Include helper function for creating mock policy routes Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
- Add tests for CreateNetworkInterfaceOptions.EFLO method - Add tests for AssignPrivateIPAddressOptions.ApplyAssignPrivateIPAddress and EFLO methods - Add tests for AssignIPv6AddressesOptions.ApplyAssignIPv6Addresses method - Cover various scenarios including valid inputs, missing required fields, and invalid IP/IPv6 counts Signed-off-by: l1b0k <libokang.lbk@alibaba-inc.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #866 +/- ##
==========================================
+ Coverage 42.15% 44.57% +2.41%
==========================================
Files 130 130
Lines 18984 18984
==========================================
+ Hits 8003 8462 +459
+ Misses 10119 9628 -491
- Partials 862 894 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BSWANG
approved these changes
Aug 1, 2025
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.
No description provided.