@@ -1184,6 +1184,47 @@ func TestRenderMainConfigK8sInYaml(t *testing.T) {
11841184 g .Expect (yamlConfig ).To (Equal (expectedK8sYamlWithClusterFilterOutput ))
11851185}
11861186
1187+ func TestClusterFluentBitConfig_Service_MultilineBufferLimit (t * testing.T ) {
1188+ g := NewGomegaWithT (t )
1189+ sl := plugins .NewSecretLoader (nil , "testnamespace" )
1190+
1191+ cfbc := ClusterFluentBitConfig {
1192+ Spec : FluentBitConfigSpec {
1193+ Service : & Service {
1194+ Daemon : utils .ToPtr (false ),
1195+ FlushSeconds : utils.ToPtr [float64 ](1 ),
1196+ MultilineBufferLimit : "5MB" ,
1197+ },
1198+ },
1199+ }
1200+
1201+ expectedClassic := `[Service]
1202+ Daemon false
1203+ Flush 1
1204+ multiline_buffer_limit 5MB
1205+ `
1206+ expectedYamlFmt := `service:
1207+ daemon: false
1208+ flush: 1
1209+ multiline_buffer_limit: 5MB
1210+ pipeline:
1211+ inputs:
1212+ outputs:
1213+ `
1214+
1215+ config , err := cfbc .RenderMainConfig (
1216+ sl , ClusterInputList {}, ClusterFilterList {}, ClusterOutputList {}, nil , nil , nil ,
1217+ )
1218+ g .Expect (err ).NotTo (HaveOccurred ())
1219+ g .Expect (config ).To (Equal (expectedClassic ))
1220+
1221+ yamlConfig , err := cfbc .RenderMainConfigInYaml (
1222+ sl , ClusterInputList {}, ClusterFilterList {}, ClusterOutputList {}, nil , nil , nil ,
1223+ )
1224+ g .Expect (err ).NotTo (HaveOccurred ())
1225+ g .Expect (yamlConfig ).To (Equal (expectedYamlFmt ))
1226+ }
1227+
11871228func TestClusterFluentBitConfig_RenderMainConfig_WithParsersFiles (t * testing.T ) {
11881229 g := NewGomegaWithT (t )
11891230 sl := plugins .NewSecretLoader (nil , "testnamespace" )
0 commit comments