We'll have two additional assemblies: Nightwatch.Core and Nightwatch.Resources.
Nightwatch.Core is a common assembly that's intended to be used by all the (potentially third-party) Resource libraries
Nightwatch.Resources is a default Resource assembly (should be optional ideally)
Each of the resource types should have its' ResourceFactory definition that builds the checker function from the parameters passed from the configuration.
Program module loads the default Resources from the Nightwatch.Resources. Later we could wire up additional used-supplied Resource assemblies there.
Resource configuration
For now, I've decided to implement two Resource types:
type: http that will send HTTP GET requests and examine the return codes
type: shell that will execute shell commands and examine the processes' exit codes
When authoring the configuration, user should explicitly state type: xxx in each of the configuration files.
Each Resource could have its own parameter set, defined by param: configuration attribute. That'll be a simple key-value map parsed by the Resource factories.
There're sample configuration files for each resource type in the samples directory.
Remaining work
[x] fix all the TODOs
[x] fix the tests (YAML parser isn't working for Map<_, _>)
[x] write the documentation for each Resource type
[x] write the contributor documentation (e.g. "How to add my own Resource")
[x] write additional tests for both the new Resource types
[x] add an issue about plugin loading (probably partially based on this PR's description): #14
Architectural solution
Nightwatch.Core
andNightwatch.Resources
.Nightwatch.Core
is a common assembly that's intended to be used by all the (potentially third-party) Resource librariesNightwatch.Resources
is a default Resource assembly (should be optional ideally)ResourceFactory
definition that builds the checker function from the parameters passed from the configuration.Program
module loads the default Resources from theNightwatch.Resources
. Later we could wire up additional used-supplied Resource assemblies there.Resource configuration
For now, I've decided to implement two Resource types:
type: http
that will send HTTP GET requests and examine the return codestype: shell
that will execute shell commands and examine the processes' exit codesWhen authoring the configuration, user should explicitly state
type: xxx
in each of the configuration files.Each Resource could have its own parameter set, defined by
param:
configuration attribute. That'll be a simple key-value map parsed by the Resource factories.There're sample configuration files for each resource type in the
samples
directory.Remaining work
Map<_, _>
)param : Map<_, _>
withparam : IDictionary<_, >
Async
from resource factory interfaceNightwatch.Core
assemblyImpact
Closes #4.