mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
22 lines
330 B
Go
22 lines
330 B
Go
package cron
|
|
|
|
import (
|
|
"github.com/0xJacky/Nginx-UI/internal/kernal"
|
|
"github.com/0xJacky/Nginx-UI/settings"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestRestartLogrotate(t *testing.T) {
|
|
settings.Init("../../app.ini")
|
|
|
|
kernal.InitDatabase()
|
|
|
|
InitCronJobs()
|
|
|
|
time.Sleep(5 * time.Second)
|
|
|
|
RestartLogrotate()
|
|
|
|
time.Sleep(2 * time.Second)
|
|
}
|