Skip to content
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

fix: validate user config #1028

Merged
merged 4 commits into from
Feb 16, 2023
Merged

fix: validate user config #1028

merged 4 commits into from
Feb 16, 2023

Conversation

tony612
Copy link
Contributor

@tony612 tony612 commented Feb 10, 2023

Signed-off-by: Bing Han h.bing612@gmail.com

Move the cfg.Validate below to validate user config. Without this fix, the test will fail:

--- FAIL: TestValidateUserConfig (0.00s)
    server_test.go:33:
        	Error Trace:	/Users/hanbing/repo/go/envoyproxy-gateway/internal/cmd/server_test.go:33
        	Error:      	An error is expected but got nil.
        	Test:       	TestValidateUserConfig
FAIL
FAIL	github.com/envoyproxy/gateway/internal/cmd	0.601s
FAIL

Signed-off-by: Bing Han <h.bing612@gmail.com>
@tony612 tony612 requested a review from a team as a code owner February 10, 2023 02:51
internal/cmd/certgen.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2023

Codecov Report

Merging #1028 (4b4eeba) into main (5115330) will increase coverage by 2.89%.
The diff coverage is 80.00%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main    #1028      +/-   ##
==========================================
+ Coverage   62.03%   64.93%   +2.89%     
==========================================
  Files          55       67      +12     
  Lines        8804     8730      -74     
==========================================
+ Hits         5462     5669     +207     
+ Misses       2967     2689     -278     
+ Partials      375      372       -3     
Impacted Files Coverage Δ
internal/cmd/server.go 17.55% <80.00%> (+10.58%) ⬆️
...ternal/infrastructure/kubernetes/serviceaccount.go 54.83% <0.00%> (-3.79%) ⬇️
internal/ir/xds.go 74.14% <0.00%> (-1.55%) ⬇️
internal/xds/translator/route.go 81.08% <0.00%> (-1.53%) ⬇️
internal/xds/translator/authentication.go 61.99% <0.00%> (-1.28%) ⬇️
internal/xds/translator/ratelimit.go 92.38% <0.00%> (-0.96%) ⬇️
internal/gatewayapi/route.go 85.12% <0.00%> (-0.11%) ⬇️
internal/status/status.go 0.00% <0.00%> (ø)
internal/gatewayapi/listener.go 100.00% <0.00%> (ø)
internal/xds/translator/cluster.go 100.00% <0.00%> (ø)
... and 22 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

internal/cmd/server_test.go Outdated Show resolved Hide resolved
Signed-off-by: Bing Han <h.bing612@gmail.com>
Signed-off-by: Bing Han <h.bing612@gmail.com>
@tony612 tony612 requested a review from arkodg February 15, 2023 06:48
Signed-off-by: Bing Han <h.bing612@gmail.com>
@tony612 tony612 requested a review from arkodg February 16, 2023 02:39
@arkodg
Copy link
Contributor

arkodg commented Feb 16, 2023

LGTM, thanks !

@arkodg arkodg merged commit b6e0471 into envoyproxy:main Feb 16, 2023
@tony612 tony612 deleted the validate-config branch February 16, 2023 05:17
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.

None yet

3 participants