Skip to content
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

Fix for unspecified health in Warnings plugin #724

Merged
merged 2 commits into from
Jan 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1985,8 +1985,8 @@ class PublisherContext extends AbstractExtensibleContext {
@SuppressWarnings('NoDef')
private static addStaticAnalysisContext(def nodeBuilder, StaticAnalysisContext context) {
nodeBuilder.with {
healthy(context.healthy)
unHealthy(context.unHealthy)
healthy(context.healthy ?: '')
unHealthy(context.unHealthy ?: '')
thresholdLimit(context.thresholdLimit)
defaultEncoding(context.defaultEncoding)
canRunOnFailed(context.canRunOnFailed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
def pmdNode = context.publisherNodes[0]
assertValues(pmdNode, [], extraNodes,
pattern: 'somewhere',
healthy: null,
unHealthy: null,
healthy: '',
unHealthy: '',
thresholdLimit: 'low',
defaultEncoding: '',
canRunOnFailed: false,
Expand Down Expand Up @@ -59,8 +59,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
context.publisherNodes.size() == 1
def warningsNode = context.publisherNodes[0]
assertValues(warningsNode, ['consoleParsers'], [:],
healthy: null,
unHealthy: null,
healthy: '',
unHealthy: '',
thresholdLimit: 'low',
defaultEncoding: '',
canRunOnFailed: false,
Expand Down Expand Up @@ -214,8 +214,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
def analysisCollectorNode = context.publisherNodes[0]
assertValues(
analysisCollectorNode,
healthy: null,
unHealthy: null,
healthy: '',
unHealthy: '',
thresholdLimit: 'low',
defaultEncoding: '',
canRunOnFailed: false,
Expand Down Expand Up @@ -307,8 +307,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
low[0].value().empty
ignoreCase[0].value() == false
excludePattern[0].value().empty
healthy[0].value() == null
unHealthy[0].value() == null
healthy[0].value() == ''
unHealthy[0].value() == ''
thresholdLimit[0].value() == 'low'
defaultEncoding[0].value().empty
thresholds[0].value().empty
Expand Down Expand Up @@ -338,8 +338,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
low[0].value().empty
ignoreCase[0].value() == false
excludePattern[0].value().empty
healthy[0].value() == null
unHealthy[0].value() == null
healthy[0].value() == ''
unHealthy[0].value() == ''
thresholdLimit[0].value() == 'low'
defaultEncoding[0].value().empty
thresholds[0].value().empty
Expand Down Expand Up @@ -372,8 +372,8 @@ class StaticAnalysisPublisherContextSpec extends Specification {
low[0].value() == 'three'
ignoreCase[0].value() == true
excludePattern[0].value() == 'bar'
healthy[0].value() == null
unHealthy[0].value() == null
healthy[0].value() == ''
unHealthy[0].value() == ''
thresholdLimit[0].value() == 'low'
defaultEncoding[0].value().empty
thresholds[0].value().empty
Expand Down