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 the bug #6022 #6075

Merged
merged 5 commits into from
Sep 10, 2024
Merged

Fix the bug #6022 #6075

merged 5 commits into from
Sep 10, 2024

Conversation

Zensey
Copy link
Contributor

@Zensey Zensey commented Sep 5, 2024

Fixes #6022

Signed-off-by: Anton Litvinov <[email protected]>
Signed-off-by: Anton Litvinov <[email protected]>
Signed-off-by: Anton Litvinov <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 5, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 28.47%. Comparing base (3174272) to head (c4a6a29).
Report is 14 commits behind head on master.

Files with missing lines Patch % Lines
ci/test/e2e.go 0.00% 21 Missing ⚠️
...guard/endpoint/netstack-provider/shaper_service.go 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6075      +/-   ##
==========================================
- Coverage   37.92%   28.47%   -9.45%     
==========================================
  Files         371      520     +149     
  Lines       20715    29987    +9272     
==========================================
+ Hits         7856     8540     +684     
- Misses      12075    20624    +8549     
- Partials      784      823      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

ok = "failed"
}
log.Println("Test result:", ok)
// dev.Down()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be cleaned.

},
}

resp, err := client.Get("http://107.173.23.19:8080/test")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a part of the local environment, we cannot depend on external service in tests.

Copy link
Contributor Author

@Zensey Zensey Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I came to a conclusion that a local address can not be used (for the endpoint), it must be an external address,
b/c we test the path: wireguard client->wireguard server->gvisor tcp/ip stack->external web server.

This test turnes out to be an integrational test by its nature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try to transform into a integrational test and run using docker compose

Copy link
Contributor Author

@Zensey Zensey Sep 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@soffokl
fixed!


func startServer(t *testing.T, privKey, pubClinet wgtypes.Key) {
tun, _, _, err := CreateNetTUNWithStack(
[]netip.Addr{netip.MustParseAddr("192.168.4.1")},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a static IP, or it can be anything?

Copy link
Contributor Author

@Zensey Zensey Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

192.168.4.1 - wireguard "server" in gvisor net
192.168.4.100 - wireguard "client"
They can be , but must have a common subnet, of course

@Zensey Zensey force-pushed the diag/6022 branch 5 times, most recently from 878347a to 97f3db6 Compare September 9, 2024 22:35
Signed-off-by: Anton Litvinov <[email protected]>
@Zensey Zensey merged commit 9967fae into master Sep 10, 2024
19 checks passed
@Zensey Zensey deleted the diag/6022 branch September 10, 2024 08:59
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.

Empty response.
3 participants