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

feat: introduce gittest #631

Merged
merged 7 commits into from
Sep 6, 2024
Merged

feat: introduce gittest #631

merged 7 commits into from
Sep 6, 2024

Conversation

atzoum
Copy link
Collaborator

@atzoum atzoum commented Sep 5, 2024

Description

  • gittest: provides a test helper for creating a git server that serves a git repository.
  • httptest: provides similar functionality to the net/http/httptest package, but with some additional features: (1) It allows you to listen to all interfaces, not just localhost and (2) for TLS servers, it allows you to specify the host name to use in the certificate.

Security

  • The code changed/added as part of this pull request won't create any security issues with how the software is being used.

@atzoum atzoum changed the title feat: introduce gittest and httptest feat: introduce gittest Sep 5, 2024
testhelper/gittest/gittest.go Outdated Show resolved Hide resolved
}

func getLocalIP(t testing.TB) string {
conn, err := net.Dial("udp", "8.8.8.8:80")
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@atzoum atzoum merged commit c7d3c82 into main Sep 6, 2024
14 checks passed
@atzoum atzoum deleted the feat.gittest branch September 6, 2024 06:20
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.

3 participants