-
Notifications
You must be signed in to change notification settings - Fork 92
test: Initial end-to-end test with gRPC messages #820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: irar2 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Welcome @irar2! |
Hi @irar2. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
✅ Deploy Preview for gateway-api-inference-extension ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
/ok-to-test |
/retest |
namespace = "ns1" | ||
) | ||
|
||
func TestServer(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be an integration test, not a unit test.
should be placed accordingly in the repo.
additionally, current code base has under integration dir hermetic_test.go
which includes some of the code that was added here.
I think it would be good to:
- identify the covered (and uncovered) things that this PR aims to add. we should add only the logic that doesn't exist.
- converge to a single integration test suite. I'm not sure it makes sense to have multiple integration tests with different setups, different structuring, etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the test to become more of a unit test rather than an end to end test
test/utils/server.go
Outdated
logger := klog.Background() | ||
ctx := klog.NewContext(context.Background(), logger) | ||
ctx, cancel := context.WithCancel(ctx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this is needed in test?
logger is not needed in test for sure. context usually initialized with context.Background() in tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@irar2 thanks for the PR. Can you resolve the review feedback and update the PR? |
Signed-off-by: Ira <[email protected]>
In making changes in response to the review comments above, I tried to do a rebase. This resulted in 185 modified files. In this PR there are only two modified files. |
Added an initial end-to-end test with gRPC messages.
In particular, this test tests the streaming server's processing of the various Envoy gRPC messages. An in-memory buffered listener is used for the gRPC server, thus eliminating the need to find free ports in the test system. The code has been structured with several helper functions, that should make it easier in the future to add more tests of this nature in the future to the system.
This test uses a dummy scheduler to choose the target pod. The goal here was to test the streaming server, to setup infrastructure for more similar tests, and not necessarily test the scheduler.