File tree 1 file changed +6
-1
lines changed
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,11 @@ func Test_Agent_configFromUnits(t *testing.T) {
277
277
})
278
278
279
279
a := & Agent {
280
- cliCfg : ucfg .New (),
280
+ cliCfg : ucfg .MustNewFrom (map [string ]interface {}{
281
+ "policy" : map [string ]interface {}{
282
+ "id" : "test-policy" ,
283
+ },
284
+ }),
281
285
agent : mockAgent ,
282
286
inputUnit : mockInClient ,
283
287
outputUnit : mockOutClient ,
@@ -287,6 +291,7 @@ func Test_Agent_configFromUnits(t *testing.T) {
287
291
require .NoError (t , err )
288
292
require .Len (t , cfg .Inputs , 1 )
289
293
assert .Equal (t , "fleet-server" , cfg .Inputs [0 ].Type )
294
+ assert .Equal (t , "test-policy" , cfg .Inputs [0 ].Policy .ID )
290
295
assert .Equal (t , "0.0.0.0" , cfg .Inputs [0 ].Server .Host )
291
296
assert .True (t , cfg .Inputs [0 ].Server .Instrumentation .Enabled )
292
297
assert .False (t , cfg .Inputs [0 ].Server .Instrumentation .TLS .SkipVerify )
You can’t perform that action at this time.
0 commit comments