File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed
boot/src/main/kotlin/spp/probe Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ object SourceProbe {
174
174
val options = NetClientOptions ()
175
175
.setReconnectAttempts(Int .MAX_VALUE ).setReconnectInterval(5000 )
176
176
.setSsl(ProbeConfiguration .sslEnabled)
177
- .setTrustAll(! ProbeConfiguration .spp.getBoolean (" verify_host" , true ))
177
+ .setTrustAll(! ProbeConfiguration .spp.getValue (" verify_host" , true ).toString().toBooleanStrict( ))
178
178
.apply {
179
179
if (ProbeConfiguration .getString(" platform_certificate" ) != null ) {
180
180
val myCaAsABuffer = Buffer .buffer(
@@ -303,10 +303,9 @@ object SourceProbe {
303
303
}
304
304
305
305
private fun unzipAgent (skywalkingVersion : String ) {
306
- val deleteProbeDirOnBoot = ProbeConfiguration .spp.getBoolean(
307
- " delete_probe_directory_on_boot" ,
308
- System .getenv(" SPP_DELETE_PROBE_DIRECTORY_ON_BOOT" )?.lowercase()?.toBooleanStrictOrNull()
309
- ) ? : true
306
+ val deleteProbeDirOnBoot = ProbeConfiguration .spp.getValue(
307
+ " delete_probe_directory_on_boot" , true
308
+ ).toString().toBooleanStrict()
310
309
if (deleteProbeDirOnBoot) {
311
310
deleteRecursively(PROBE_DIRECTORY )
312
311
}
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ class ProbeConfigurationTest {
36
36
37
37
ProbeConfiguration .localProperties = config
38
38
assertEquals(false , ProbeConfiguration .sslEnabled)
39
+ assertEquals(true , ProbeConfiguration .spp.getValue(" verify_host" ).toString().toBooleanStrict())
40
+ assertEquals(
41
+ false ,
42
+ ProbeConfiguration .spp.getValue(" delete_probe_directory_on_boot" ).toString().toBooleanStrict()
43
+ )
39
44
40
45
val swSettings = ProbeConfiguration .toSkyWalkingSettings(config)
41
46
assertEquals(" INFO" , swSettings.find {
Original file line number Diff line number Diff line change 2
2
platform_host : ${SPP_PROBE_PLATFORM_HOST:-127.0.0.1}
3
3
platform_port : ${SPP_PROBE_PLATFORM_PORT:-1234}
4
4
ssl_enabled : ${SPP_PROBE_SSL_ENABLED:-false}
5
+ verify_host : ${SPP_PROBE_VERIFY_HOST:-true}
6
+ delete_probe_directory_on_boot : ${SPP_PROBE_DELETE_PROBE_DIRECTORY_ON_BOOT:-false}
5
7
skywalking :
6
8
logging :
7
9
level : ${SW_LOGGING_LEVEL:-INFO}
You can’t perform that action at this time.
0 commit comments