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

Recursive sanitize #3505

Merged
merged 4 commits into from
Sep 27, 2017
Merged

Recursive sanitize #3505

merged 4 commits into from
Sep 27, 2017

Conversation

magiconair
Copy link
Contributor

This patch refactors runtime.Sanitized() to recursively clean the runtime config and format complex fields like net.Addr implementations and time.Duration values.

It pulls in a diff library for comparing test output.

@magiconair magiconair added this to the 1.0 milestone Sep 27, 2017
@magiconair magiconair self-assigned this Sep 27, 2017
@magiconair magiconair requested a review from slackpad September 27, 2017 10:11
@@ -189,7 +189,7 @@ func TestAgent_Self(t *testing.T) {
t.Fatalf("incorrect port: %v", obj)
}

if int(val.Config.SerfPortLAN) != a.Config.SerfPortLAN {
if int(val.Config["SerfPortLAN"].(int)) != a.Config.SerfPortLAN {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can remove the outer int(..) now

@slackpad slackpad merged commit 21118ca into master Sep 27, 2017
@slackpad slackpad deleted the recursive-sanitize branch September 27, 2017 18:47
@slackpad slackpad mentioned this pull request Sep 27, 2017
10 tasks
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