1
0

cron_test.go 330 B

12345678910111213141516171819202122
  1. package cron
  2. import (
  3. "github.com/0xJacky/Nginx-UI/internal/kernal"
  4. "github.com/0xJacky/Nginx-UI/settings"
  5. "testing"
  6. "time"
  7. )
  8. func TestRestartLogrotate(t *testing.T) {
  9. settings.Init("../../app.ini")
  10. kernal.InitDatabase()
  11. InitCronJobs()
  12. time.Sleep(5 * time.Second)
  13. RestartLogrotate()
  14. time.Sleep(2 * time.Second)
  15. }