mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
initialize capabilities unit test
This commit is contained in:
parent
fcee7a0105
commit
e37519151b
@ -18,10 +18,17 @@ package capabilities
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGet(t *testing.T) {
|
func TestGet(t *testing.T) {
|
||||||
|
defer func() {
|
||||||
|
capInstance.lock.Lock()
|
||||||
|
defer capInstance.lock.Unlock()
|
||||||
|
capInstance.capabilities = nil
|
||||||
|
capInstance.once = sync.Once{}
|
||||||
|
}()
|
||||||
defaultCap := Capabilities{
|
defaultCap := Capabilities{
|
||||||
AllowPrivileged: false,
|
AllowPrivileged: false,
|
||||||
PrivilegedSources: PrivilegedSources{
|
PrivilegedSources: PrivilegedSources{
|
||||||
|
Loading…
Reference in New Issue
Block a user