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 {
174174 val options = NetClientOptions ()
175175 .setReconnectAttempts(Int .MAX_VALUE ).setReconnectInterval(5000 )
176176 .setSsl(ProbeConfiguration .sslEnabled)
177- .setTrustAll(! ProbeConfiguration .spp.getBoolean (" verify_host" , true ))
177+ .setTrustAll(! ProbeConfiguration .spp.getValue (" verify_host" , true ).toString().toBooleanStrict( ))
178178 .apply {
179179 if (ProbeConfiguration .getString(" platform_certificate" ) != null ) {
180180 val myCaAsABuffer = Buffer .buffer(
@@ -303,10 +303,9 @@ object SourceProbe {
303303 }
304304
305305 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()
310309 if (deleteProbeDirOnBoot) {
311310 deleteRecursively(PROBE_DIRECTORY )
312311 }
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ class ProbeConfigurationTest {
3636
3737 ProbeConfiguration .localProperties = config
3838 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+ )
3944
4045 val swSettings = ProbeConfiguration .toSkyWalkingSettings(config)
4146 assertEquals(" INFO" , swSettings.find {
Original file line number Diff line number Diff line change 22 platform_host : ${SPP_PROBE_PLATFORM_HOST:-127.0.0.1}
33 platform_port : ${SPP_PROBE_PLATFORM_PORT:-1234}
44 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}
57skywalking :
68 logging :
79 level : ${SW_LOGGING_LEVEL:-INFO}
You can’t perform that action at this time.
0 commit comments