@@ -372,69 +372,6 @@ VOID TEST(ConfigReloadTest, ReloadPid)
372
372
handler.reset ();
373
373
}
374
374
375
- VOID TEST (ConfigReloadTest, ReloadLogTank)
376
- {
377
- MockReloadHandler handler;
378
- MockSrsReloadConfig conf;
379
-
380
- conf.subscribe (&handler);
381
- EXPECT_TRUE (ERROR_SUCCESS == conf.parse (_MIN_OK_CONF" srs_log_tank console;" ));
382
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_tank console;" ));
383
- EXPECT_TRUE (handler.all_false ());
384
- handler.reset ();
385
-
386
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_tank file;" ));
387
- EXPECT_TRUE (handler.log_tank_reloaded );
388
- EXPECT_EQ (1 , handler.count_true ());
389
- handler.reset ();
390
-
391
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_tank console;" ));
392
- EXPECT_EQ (1 , handler.count_true ());
393
- handler.reset ();
394
- }
395
-
396
- VOID TEST (ConfigReloadTest, ReloadLogLevel)
397
- {
398
- MockReloadHandler handler;
399
- MockSrsReloadConfig conf;
400
-
401
- conf.subscribe (&handler);
402
- EXPECT_TRUE (ERROR_SUCCESS == conf.parse (_MIN_OK_CONF" srs_log_level trace;" ));
403
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_level trace;" ));
404
- EXPECT_TRUE (handler.all_false ());
405
- handler.reset ();
406
-
407
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_level warn;" ));
408
- EXPECT_TRUE (handler.log_level_reloaded );
409
- EXPECT_EQ (1 , handler.count_true ());
410
- handler.reset ();
411
-
412
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_level trace;" ));
413
- EXPECT_EQ (1 , handler.count_true ());
414
- handler.reset ();
415
- }
416
-
417
- VOID TEST (ConfigReloadTest, ReloadLogFile)
418
- {
419
- MockReloadHandler handler;
420
- MockSrsReloadConfig conf;
421
-
422
- conf.subscribe (&handler);
423
- EXPECT_TRUE (ERROR_SUCCESS == conf.parse (_MIN_OK_CONF" srs_log_file srs.log;" ));
424
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_file srs.log;" ));
425
- EXPECT_TRUE (handler.all_false ());
426
- handler.reset ();
427
-
428
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_file srs1.log;" ));
429
- EXPECT_TRUE (handler.log_file_reloaded );
430
- EXPECT_EQ (1 , handler.count_true ());
431
- handler.reset ();
432
-
433
- EXPECT_TRUE (ERROR_SUCCESS == conf.do_reload (_MIN_OK_CONF" srs_log_file srs.log;" ));
434
- EXPECT_EQ (1 , handler.count_true ());
435
- handler.reset ();
436
- }
437
-
438
375
VOID TEST (ConfigReloadTest, ReloadPithyPrint)
439
376
{
440
377
MockReloadHandler handler;
0 commit comments