Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

add Request interface to make plugin testing easier #645

Merged
merged 1 commit into from
Feb 10, 2020

Conversation

wwitzel3
Copy link
Contributor

@wwitzel3 wwitzel3 commented Feb 7, 2020

Signed-off-by: Wayne Witzel III wayne@riotousliving.com

What this PR does / why we need it:
Adds a Request interface for plugins to allow easy mocking/faking of the service.Request type. This allows plugins to properly unit test their route handlers when they are accessing things like the Context.

A sample plugin was created to test this new interface: https://github.com/wwitzel3/octant-actions-plugin

Which issue(s) this PR fixes

Special notes for your reviewer: This is a breaking API change ⚠️

cc: @GarySmith

Copy link
Contributor

@GuessWhoSamFoo GuessWhoSamFoo left a comment

Choose a reason for hiding this comment

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

lgtm

Signed-off-by: Wayne Witzel III <wayne@riotousliving.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External plugins not unit testable
2 participants