Page MenuHomePhabricator

Refactor validation tests without YAML parsing
ClosedPublic

Authored by dduvall on Apr 5 2018, 10:13 PM.

Details

Reviewers
thcipriani
demon
hashar
mmodell
Group Reviewers
Release-Engineering-Team
Commits
rGBLBRea364b2f417e: Refactor validation tests without YAML parsing
Patch without arc
git checkout -b D1023 && curl -L https://phabricator.wikimedia.org/D1023?download=true | git apply
Summary

Since config.Validate was changed to take any interface as an
argument, many of the validation tests can be refactored in a way that
avoids having to parse the full config context in YAML and instead
validates each specific config struct directly. The new test pattern is
simpler and less prone to future breakage should unrelated parts of the
overall config change.

Tests that rely on root config context were left unchanged.

Test Plan

Run go test ./....

Diff Detail

Repository
rGBLBR Blubber
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

dduvall created this revision.Apr 5 2018, 10:13 PM
Restricted Application added a reviewer: Release-Engineering-Team. · View Herald TranscriptApr 5 2018, 10:13 PM
Restricted Application added a project: Release-Engineering-Team. · View Herald Transcript
dduvall requested review of this revision.Apr 5 2018, 10:13 PM
thcipriani accepted this revision.Apr 5 2018, 10:31 PM

nice.

nitpick: mixed underscores with camelCase gives me the jeebies.

This revision is now accepted and ready to land.Apr 5 2018, 10:31 PM
dduvall updated this revision to Diff 2687.Apr 5 2018, 10:42 PM

Removed the underscores, removed the jeebies.

dduvall updated this revision to Diff 2688.Apr 5 2018, 10:43 PM

Missed a jeebie

dduvall updated this revision to Diff 2689.Apr 5 2018, 10:46 PM

Last jeebie

This revision was automatically updated to reflect the committed changes.