-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Enable go-sockaddr templating for network-interface
#10404
Conversation
This PR also adds a fast-fail to in the case where an invalid interface is set or produced by the template
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 once the link gets fixed. Take my other comments as suggestions only.
Not sure why the tests didn't run on CircleCI. The new test code passes fine (including a run of all of ./command/agent
), and we'll probably get a full run once you push the fix for the link anyways:
$ go test -v ./command/agent -run TestConfig_normalizeAddrs
=== RUN TestConfig_normalizeAddrs_DevMode
--- PASS: TestConfig_normalizeAddrs_DevMode (0.00s)
=== RUN TestConfig_normalizeAddrs_NoAdvertise
--- PASS: TestConfig_normalizeAddrs_NoAdvertise (0.00s)
=== RUN TestConfig_normalizeAddrs_AdvertiseLocalhost
--- PASS: TestConfig_normalizeAddrs_AdvertiseLocalhost (0.00s)
=== RUN TestConfig_normalizeAddrs_IPv6Loopback
--- PASS: TestConfig_normalizeAddrs_IPv6Loopback (0.00s)
=== RUN TestConfig_normalizeAddrs
--- PASS: TestConfig_normalizeAddrs (0.01s)
PASS
ok github.com/hashicorp/nomad/command/agent 0.337s
@@ -986,6 +987,103 @@ func TestConfig_normalizeAddrs(t *testing.T) { | |||
} | |||
} | |||
|
|||
func TestConfig_templateNetworkInterface(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 is a nice testing improvement!
Could this be related to #8169 ? |
@shantanugadgil this changset will ship in 1.1.0. #8169 looks like a different field. |
Yes, I was making a push/request for the field |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This adds go-sockaddr templating for the client.network_interface attribute. @lgfa29 helped me write the tests.
Closes #3675
Fixes #5498