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

Create a class to handle the plugins.json file #3575

merged 9 commits into from Nov 16, 2018


None yet
3 participants

clintoncwolfe commented Nov 3, 2018

Fixes #3350

This is an internal refactor for the plugins system. As tech debt, we had implemented the reading, validation, and writing of the plugin state file, ~/.inspec/plugins.json scattered accross several files, with no one class having responsibility. Testing was minimal.

This PR creates a class to handle the statefile and gate modifications to it with validation. Unit tests are included.

The Loader and Installer classes are modified to use the ConfigFile class, and their tests are updated.

clintoncwolfe added some commits Nov 2, 2018

unit tests for plugin conf file class, all skip
Signed-off-by: Clinton Wolfe <>
File path stuff works
Signed-off-by: Clinton Wolfe <>
Validation works
Signed-off-by: Clinton Wolfe <>
Add works
Signed-off-by: Clinton Wolfe <>
Added remove_entry
Signed-off-by: Clinton Wolfe <>
Save works - ready to refactor others
Signed-off-by: Clinton Wolfe <>
Rework Loader to use ConfigFile
Signed-off-by: Clinton Wolfe <>
Modify loader and installer to use the config file class
Signed-off-by: Clinton Wolfe <>
Signed-off-by: Clinton Wolfe <>

jquick approved these changes Nov 8, 2018

Code and tests look good to me! Thanks @clintoncwolfe


miah approved these changes Nov 16, 2018

Looks great, excellent test coverage and error handling. A++ Would review again =)

@jquick jquick merged commit 3c8697e into master Nov 16, 2018

4 checks passed

DCO This commit has a DCO Signed-off-by
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
expeditor/config-validation Validated your Expeditor config file

@jquick jquick deleted the cw/plugins-statefile-class branch Nov 16, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment