File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
dd-smoke-tests/dynamic-config/src/test/groovy/datadog/smoketest Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ class AppSecActivationSmokeTest extends AbstractSmokeTest {
1212 ' -Ddd.remote_config.enabled=true' ,
1313 " -Ddd.remote_config.url=http://localhost:${ server.address.port} /v0.7/config" . toString(),
1414 ' -Ddd.remote_config.poll_interval.seconds=1' ,
15+ ' -Ddd.profiling.enabled=false' ,
1516 ' -cp' ,
1617 System . getProperty(' datadog.smoketest.shadowJar.path' ),
1718 AppSecApplication . name
@@ -30,10 +31,12 @@ class AppSecActivationSmokeTest extends AbstractSmokeTest {
3031 if (it[' request_type' ] != ' app-client-configuration-change' ) {
3132 return false
3233 }
33- final payload = (Map<String , Object > ) it[' payload' ]
34- final configurations = (List<Map<String , Object > > ) payload[' configuration' ]
35- final enabled = configurations. find { it[' name' ] == ' appsec_enabled' }
36- return enabled[' value' ] == ' true' && enabled[' origin' ] == ' remote_config'
34+ final configurations = (List<Map<String , Object > > ) it?. payload?. configuration ?: []
35+ final enabledConfig = configurations. find { it. name == ' appsec_enabled' }
36+ if (! enabledConfig) {
37+ return false
38+ }
39+ return enabledConfig. value == ' true' && enabledConfig .origin == ' remote_config'
3740 }
3841 }
3942}
You can’t perform that action at this time.
0 commit comments