1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2024-12-14 11:03:09 +02:00

Change telemetry disabled message to be more kind (#530)

Please, don't use exclamation marks in user interfaces.
This commit is contained in:
Florian Wilhelm 2019-02-21 13:56:20 +01:00 committed by GitHub
parent d2b6be4e25
commit 02afb22c74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ class Telemetry implements Serializable{
static notify(Script steps, Map config, Map payload){
//allow opt-out via configuration
if (!config?.collectTelemetryData) {
steps.echo "[${payload.step}] Telemetry reporting disabled!"
steps.echo "[${payload.step}] Sending telemetry data is disabled."
return
}

View File

@ -82,7 +82,7 @@ class TelemetryTest extends BasePiperTest {
Telemetry.notify(nullScript, [collectTelemetryData: false], [step: 'anyStep', anything: 'something'])
// asserts
assertThat(Telemetry.getInstance().listenerList, is(not(empty())))
assertThat(jlr.log, containsString("[anyStep] Telemetry reporting disabled!"))
assertThat(jlr.log, containsString("[anyStep] Sending telemetry data is disabled."))
assertThat(notificationPayload.keySet(), is(empty()))
}
@ -99,7 +99,7 @@ class TelemetryTest extends BasePiperTest {
Telemetry.notify(nullScript, [:], [step: 'anyStep', anything: 'something'])
// asserts
assertThat(Telemetry.getInstance().listenerList, is(not(empty())))
assertThat(jlr.log, containsString("[anyStep] Telemetry reporting disabled!"))
assertThat(jlr.log, containsString("[anyStep] Sending telemetry data is disabled."))
assertThat(notificationPayload.keySet(), is(empty()))
}
@ -116,7 +116,7 @@ class TelemetryTest extends BasePiperTest {
Telemetry.notify(nullScript, null, [step: 'anyStep', anything: 'something'])
// asserts
assertThat(Telemetry.getInstance().listenerList, is(not(empty())))
assertThat(jlr.log, containsString("[anyStep] Telemetry reporting disabled!"))
assertThat(jlr.log, containsString("[anyStep] Sending telemetry data is disabled."))
assertThat(notificationPayload.keySet(), is(empty()))
}