-
Notifications
You must be signed in to change notification settings - Fork 55
Added test workflow for PR and upgraded dependencies #76
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
Conversation
61bb7c6
to
0b4bdf0
Compare
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.
Thanks for this, the security vulnerability fix is just the mod update, and I'm guessing you decided to fix the tests because they were failing on your machine? I think that makes sense. I added some comments, let me know what you think!
template/template_test.go
Outdated
// { | ||
// // Assume the private IPs available on the host are: 10.1.2.3 | ||
// // fe80::1025:f732:1001:203 | ||
// name: "GetPrivateIPs", | ||
// input: `{{GetPrivateIPs}}`, | ||
// output: `10.1.2.3 fe80::1025:f732:1001:203`, | ||
// }, | ||
// { | ||
// // Assume the public IPs available on the host are: 1.2.3.4 6.7.8.9 | ||
// name: "GetPublicIPs", | ||
// input: `{{GetPublicIPs}}`, | ||
// output: `1.2.3.4 6.7.8.9`, | ||
// }, | ||
// { | ||
// // Assume the private IPs on this host are just the IPv4 addresses: | ||
// // 10.1.2.3 and 172.16.4.6 | ||
// name: "GetInterfaceIPs", | ||
// input: `{{GetInterfaceIPs "en0"}}`, | ||
// output: `10.1.2.3 and 172.16.4.6`, | ||
// }, |
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.
Remove these
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.
+1 to @johanbrandhorst's comments about bumping Go and dropping commented out tests.
Logic fix looks good.
Can we update the title and description to drop the security vulnerabilities
reference or at least clarify it's a vulnerability in a dependency that is unused by go-sockaddr. go-sockaddr does not have a vulnerability, and I would hate people (or security scanners) to flag the wrong package!
Please correct me if I'm missing something.
This will supersede and close #50. Many apologies for missing the opportunity to merge that one! |
1791c24
to
66c72a0
Compare
ifaddrs_test.go
Outdated
@@ -632,7 +633,7 @@ func TestGetIfAddrs(t *testing.T) { | |||
t.Fatalf("No loopback interfaces found, loInt nil") | |||
} | |||
|
|||
if val := sockaddr.IfAddrAttr(*loInt, "flags"); !(val == "up|loopback|multicast" || val == "up|loopback") { | |||
if val := sockaddr.IfAddrAttr(*loInt, "flags"); !strings.Contains(val, "up|loopback") { |
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 was this changed? This isn't the same behavior anymore.
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.
We are now getting, up|loopback|running
as the response on CI and up|loopback|multicast|running
on local when running with go1.23. Changed the function from contains check to a stricter exact string match
.github/workflows/build_test.yml
Outdated
- '1.19' | ||
- '1.20' | ||
- '1.21' | ||
- '1.22' | ||
- '1.23' |
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.
To make this a little more future proof, we can use the stable
and oldstable
aliases to use the current and the previous release for this.
- '1.19' | |
- '1.20' | |
- '1.21' | |
- '1.22' | |
- '1.23' | |
- 'oldstable' | |
- 'stable' |
@@ -27,6 +27,6 @@ require ( | |||
github.com/posener/complete v1.1.1 // indirect | |||
github.com/shopspring/decimal v1.2.0 // indirect | |||
github.com/spf13/cast v1.3.1 // indirect | |||
golang.org/x/crypto v0.17.0 // indirect | |||
golang.org/x/sys v0.22.0 // indirect | |||
golang.org/x/crypto v0.32.0 // indirect |
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.
Could you also change the go
stanza at the top of the file to 1.23
?
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.
Thanks for this, this repo needed a bit of love, just in time for valentines day ❤️
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.
LGTM
Description