File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
dd-smoke-tests/appsec/springboot/src/test/groovy/datadog/smoketest/appsec Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -539,18 +539,18 @@ class SpringBootSmokeTest extends AbstractAppSecServerSmokeTest {
539539 waitForTraceCount(2 )
540540 secondResponse. code() == 403
541541 secondResponse. body(). string(). contains(' You\' ve been blocked' )
542- final rootSpan = this . rootSpans. find { it . meta[ ' usr.session_id ' ] != null }
543- rootSpan != null
544- assert rootSpan . meta . get( ' appsec.blocked ' ) == ' true ' , ' appsec.blocked is not set '
545- assert rootSpan . meta . get( ' _dd.appsec.json ' ) != null , ' _dd. appsec.json is not set'
542+ final blockedSpans = this . rootSpans. findAll {
543+ it . meta[ ' _dd.appsec.json ' ] != null
544+ }
545+ assert ! blockedSpans . empty , ' appsec.blocked is not set'
546546 def trigger = null
547- for (t in rootSpan . triggers) {
547+ for (t in blockedSpans . triggers. flatten() ) {
548548 if (t[' rule' ][' id' ] == ' __test_session_id_block' ) {
549549 trigger = t
550550 break
551551 }
552552 }
553- assert trigger != null , ' test trigger not found'
553+ assert trigger != null , ' session_id block trigger not found'
554554 }
555555
556556 void ' rasp blocks on CMDI' () {
You can’t perform that action at this time.
0 commit comments