File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,15 @@ def receivers(telemetry)
74
74
case content . path . product
75
75
when 'ASM_DD'
76
76
rules << parsed_content
77
+ content . applied
77
78
when 'ASM_DATA'
78
79
data << parsed_content [ 'rules_data' ] if parsed_content [ 'rules_data' ]
80
+ content . applied
79
81
when 'ASM'
80
82
overrides << parsed_content [ 'rules_override' ] if parsed_content [ 'rules_override' ]
81
83
exclusions << parsed_content [ 'exclusions' ] if parsed_content [ 'exclusions' ]
82
84
custom_rules << parsed_content [ 'custom_rules' ] if parsed_content [ 'custom_rules' ]
85
+ content . applied
83
86
end
84
87
end
85
88
Original file line number Diff line number Diff line change 173
173
receiver . call ( repository , changes )
174
174
end
175
175
176
+ it 'sets apply_state to ACKNOWLEDGED on content' do
177
+ receiver . call ( repository , transaction )
178
+
179
+ expect ( content . apply_state ) . to eq ( Datadog ::Core ::Remote ::Configuration ::Content ::ApplyState ::ACKNOWLEDGED )
180
+ end
181
+
176
182
context 'content product' do
177
183
before do
178
184
# Stub the reconfigure method, so we do not trigger background reconfiguration
290
296
291
297
context 'ASM' do
292
298
let ( :path ) { 'datadog/603646/ASM/whatevername/config' }
299
+ let ( :data ) { { } }
300
+
301
+ it 'sets apply_state to ACKNOWLEDGED on content' do
302
+ receiver . call ( repository , transaction )
303
+
304
+ expect ( content . apply_state ) . to eq ( Datadog ::Core ::Remote ::Configuration ::Content ::ApplyState ::ACKNOWLEDGED )
305
+ end
293
306
294
307
context 'overrides' do
295
308
let ( :data ) do
405
418
406
419
context 'ASM_DATA' do
407
420
let ( :path ) { 'datadog/603646/ASM_DATA/whatevername/config' }
421
+ let ( :data ) { { } }
422
+
423
+ it 'sets apply_state to ACKNOWLEDGED on content' do
424
+ receiver . call ( repository , transaction )
425
+
426
+ expect ( content . apply_state ) . to eq ( Datadog ::Core ::Remote ::Configuration ::Content ::ApplyState ::ACKNOWLEDGED )
427
+ end
408
428
409
429
context 'with rules_data information' do
410
430
let ( :data ) do
You can’t perform that action at this time.
0 commit comments