mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-05-07 14:32:42 +08:00
15 lines
342 B
Go
15 lines
342 B
Go
package backup
|
|
|
|
import "testing"
|
|
|
|
func TestUploadedBackupPathIgnoresClientFileName(t *testing.T) {
|
|
tempDir := "/tmp/nginx-ui-restore-upload-123"
|
|
|
|
got := uploadedBackupPath(tempDir)
|
|
want := "/tmp/nginx-ui-restore-upload-123/uploaded-backup.zip"
|
|
|
|
if got != want {
|
|
t.Fatalf("uploadedBackupPath(%q) = %q, want %q", tempDir, got, want)
|
|
}
|
|
}
|