mirror of
https://github.com/harness/drone.git
synced 2025-05-05 11:01:23 +08:00

* initial work on create repository * create repository as single method call using client stream * resources handler and files * minor fix for wire dep graph
21 lines
332 B
Go
21 lines
332 B
Go
package lock
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
)
|
|
|
|
func TestClient_AcquireLock(t *testing.T) {
|
|
c := Mutex{}
|
|
lock, err := c.AcquireLock(context.Background(), "simple")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
lock1, err := c.AcquireLock(context.Background(), "simple")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
lock.Release()
|
|
lock1.Release()
|
|
}
|