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

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

Removed the underscores, removed the jeebies.

This revision was automatically updated to reflect the committed changes.