mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-09 00:56:37 +08:00
[修复] 升级功能问题修复
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -174,6 +175,13 @@ func TestUploadManualServerBinary(t *testing.T) {
|
||||
if candidate.UploadToken != info.UploadToken {
|
||||
t.Fatalf("unexpected stored upload token: %s", candidate.UploadToken)
|
||||
}
|
||||
execPath, err := os.Executable()
|
||||
if err != nil {
|
||||
t.Fatalf("failed to get executable path: %v", err)
|
||||
}
|
||||
if filepath.Dir(candidate.TempPath) != filepath.Dir(execPath) {
|
||||
t.Fatalf("expected temporary binary in executable dir, got %s want %s", filepath.Dir(candidate.TempPath), filepath.Dir(execPath))
|
||||
}
|
||||
}
|
||||
|
||||
func TestUploadManualServerBinaryRejectsSameVersion(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user