refactor: Rename project from dns-helper to ekdns across all files and documentation
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
lockFileName = ".dns-helper.lock"
|
||||
lockFileName = ".ekdns.lock"
|
||||
staleTimeout = 2 * time.Minute
|
||||
retryInterval = 200 * time.Millisecond
|
||||
maxWait = 2 * time.Second
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"dns-helper/lockfile"
|
||||
"ekdns/lockfile"
|
||||
)
|
||||
|
||||
// T006-1: Acquire succeeds and lock file exists on disk.
|
||||
@@ -18,7 +18,7 @@ func TestAcquireSucceeds(t *testing.T) {
|
||||
}
|
||||
defer lock.Release()
|
||||
|
||||
lockPath := filepath.Join(dir, ".dns-helper.lock")
|
||||
lockPath := filepath.Join(dir, ".ekdns.lock")
|
||||
if _, err := os.Stat(lockPath); os.IsNotExist(err) {
|
||||
t.Error("lock file does not exist after Acquire")
|
||||
}
|
||||
@@ -36,7 +36,7 @@ func TestReleaseDeletesLockFile(t *testing.T) {
|
||||
t.Fatalf("Release returned unexpected error: %v", err)
|
||||
}
|
||||
|
||||
lockPath := filepath.Join(dir, ".dns-helper.lock")
|
||||
lockPath := filepath.Join(dir, ".ekdns.lock")
|
||||
if _, err := os.Stat(lockPath); !os.IsNotExist(err) {
|
||||
t.Error("lock file still exists after Release")
|
||||
}
|
||||
@@ -60,7 +60,7 @@ func TestDoubleAcquireFails(t *testing.T) {
|
||||
// T006-4: Stale lock file (>2 minutes old) is broken and Acquire succeeds.
|
||||
func TestStaleLockBroken(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
lockPath := filepath.Join(dir, ".dns-helper.lock")
|
||||
lockPath := filepath.Join(dir, ".ekdns.lock")
|
||||
|
||||
// Manually create a lock file with a stale modification time.
|
||||
if err := os.WriteFile(lockPath, []byte("99999\n"), 0644); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user