25 lines
356 B
Go
25 lines
356 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func TestTruncate(t *testing.T) {
|
|
tmpDir := t.TempDir()
|
|
|
|
mkDirForTest(t, fmt.Sprintf("%s/tmp", tmpDir))
|
|
rulesJsonFp := "testData/app_over_size.log"
|
|
|
|
expected := fmt.Sprintf("%s/tmp/app.log", tmpDir)
|
|
|
|
cpFileForTest(t, rulesJsonFp, expected)
|
|
|
|
cfg := &LogFile{
|
|
path: expected,
|
|
}
|
|
|
|
// Continue from here
|
|
|
|
}
|