@@ -348,6 +348,8 @@ outputs:
348348 type: elasticsearch
349349 hosts: [http://localhost:9200]
350350 api_key: placeholder
351+ status_reporting:
352+ enabled: false
351353agent.monitoring.enabled: false
352354`
353355
@@ -359,13 +361,25 @@ agent.monitoring.enabled: false
359361
360362 ctx , cancel := testcontext .WithDeadline (t , context .Background (), time .Now ().Add (10 * time .Minute ))
361363 defer cancel ()
364+ expectedComponentState := map [string ]integrationtest.ComponentState {
365+ "filestream-default" : {
366+ State : integrationtest .NewClientState (client .Healthy ),
367+ Units : map [integrationtest.ComponentUnitKey ]integrationtest.ComponentUnitState {
368+ integrationtest.ComponentUnitKey {UnitType : client .UnitTypeOutput , UnitID : "filestream-default" }: {
369+ State : integrationtest .NewClientState (client .Healthy ),
370+ },
371+ integrationtest.ComponentUnitKey {UnitType : client .UnitTypeInput , UnitID : "filestream-default-filestream-filebeat" }: {
372+ State : integrationtest .NewClientState (client .Healthy ),
373+ },
374+ },
375+ },
376+ }
377+ expectedAgentState := integrationtest .NewClientState (client .Healthy )
362378
363379 testCases := []struct {
364380 name string
365381 runtime string
366382 expectedCompDiagnosticsFiles []string
367- expectedAgentState * client.State
368- expectedComponentState map [string ]integrationtest.ComponentState
369383 }{
370384 {
371385 name : "filebeat process" ,
@@ -377,20 +391,6 @@ agent.monitoring.enabled: false
377391 "beat-rendered-config.yml" ,
378392 "global_processors.txt" ,
379393 ),
380- expectedAgentState : integrationtest .NewClientState (client .Healthy ),
381- expectedComponentState : map [string ]integrationtest.ComponentState {
382- "filestream-default" : {
383- State : integrationtest .NewClientState (client .Healthy ),
384- Units : map [integrationtest.ComponentUnitKey ]integrationtest.ComponentUnitState {
385- integrationtest.ComponentUnitKey {UnitType : client .UnitTypeOutput , UnitID : "filestream-default" }: {
386- State : integrationtest .NewClientState (client .Healthy ),
387- },
388- integrationtest.ComponentUnitKey {UnitType : client .UnitTypeInput , UnitID : "filestream-default-filestream-filebeat" }: {
389- State : integrationtest .NewClientState (client .Healthy ),
390- },
391- },
392- },
393- },
394394 },
395395 {
396396 name : "filebeat receiver" ,
@@ -400,7 +400,6 @@ agent.monitoring.enabled: false
400400 "beat_metrics.json" ,
401401 "input_metrics.json" ,
402402 },
403- expectedAgentState : integrationtest .NewClientState (client .Degraded ),
404403 },
405404 }
406405
@@ -443,8 +442,8 @@ agent.monitoring.enabled: false
443442 }
444443 err = f .Run (ctx , integrationtest.State {
445444 Configure : configBuffer .String (),
446- AgentState : tc . expectedAgentState ,
447- Components : tc . expectedComponentState ,
445+ AgentState : expectedAgentState ,
446+ Components : expectedComponentState ,
448447 After : testDiagnosticsFactory (t , filebeatSetup , expDiagFiles , tc .expectedCompDiagnosticsFiles , f , []string {"diagnostics" , "collect" }),
449448 })
450449 assert .NoError (t , err )
@@ -475,6 +474,8 @@ outputs:
475474 type: elasticsearch
476475 hosts: [http://localhost:9200]
477476 api_key: placeholder
477+ status_reporting:
478+ enabled: false
478479agent.monitoring.enabled: false
479480`
480481
0 commit comments