test(): Comprehensive test coverage for Kubernetes operations#85
test(): Comprehensive test coverage for Kubernetes operations#85Arpit529Srivastava wants to merge 2 commits intokubeslice:masterfrom
Conversation
Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
|
@narmidm @Rahul-D78 @gourishkb |
|
Hey @Arpit529Srivastava I know you might have worked hard on this, but just curious aren't these just testing command-building logic instead of testing the actual functions. I mean don't you think these tests would still pass even if those functions were completely broken, because you're only testing argument-building logic, not whether the actual functions work or not ? Even I would love to understand more, but do you think is there any use of just testing the argument construction logic ? |
|
@Alokzh Thanks for the feedback. right now, i’m only testing argument construction, so broken functions might still pass because i’m over-mocking and not testing real behavior. |
|
with the feedback what i this to fix this taht i'll keep unit tests for argument building but add integration tests that use real kubectl commands when possible. |
|
will be updating the PR soon |
Signed-off-by: arpit529srivastava <arpitsrivastava529@gmail.com>
|
cc : @gourishkb @narmidm |
Description
Added comprehensive integration tests for
pkg/internal/kubernetes-operation.gofunctions that test real behavior with actual external dependencies.Key Changes
How Has This Been Tested?
Test Cases
Checklist:
Does this PR introduce a breaking change?
No - This is purely a test addition with no functional changes.