feat: publish Tend v0.2 preview source
Publish the reviewed allowlisted snapshot whose exact binary completed maintenance deployment, rollback, and reactivation exercises for Gamertan and Sandwich Hime. Private-Source-Commit: 4d7094c8b7c61991bfb67b11fc1558724c874eb2 Private-Source-Tree: 54a2f74804f7acddf3755d7d4da5b97f5fc28381 AI-Assistance: OpenAI Codex assisted implementation, testing, security review, and release verification. Signed-off-by: Cole Speelman <crspeelman@gmail.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
//go:build linux
|
||||
|
||||
package deploy
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHostWideLockSerializesIndependentServices(t *testing.T) {
|
||||
path := filepath.Join(t.TempDir(), "tend-deploy.lock")
|
||||
first, err := acquireLock(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer first.Close()
|
||||
if second, err := acquireLock(path); err == nil {
|
||||
_ = second.Close()
|
||||
t.Fatal("second service acquired the shared activation lock")
|
||||
}
|
||||
if err = first.Close(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
third, err := acquireLock(path)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
_ = third.Close()
|
||||
}
|
||||
Reference in New Issue
Block a user