You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
330 B
Go
23 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)
|
|
}
|