1.4.5.2
This commit is contained in:
24
EdgeNode/internal/network-security/manager_test.go
Normal file
24
EdgeNode/internal/network-security/manager_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
//go:build plus && packet
|
||||
|
||||
package networksecurity_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/nodeconfigs"
|
||||
networksecurity "github.com/TeaOSLab/EdgeNode/internal/network-security"
|
||||
"github.com/TeaOSLab/EdgeNode/internal/utils/testutils"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestManager_Apply(t *testing.T) {
|
||||
if !testutils.IsSingleTesting() {
|
||||
if os.Getgid() > 0 {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
var manager = networksecurity.NewManager()
|
||||
var policy = nodeconfigs.NewNetworkSecurityPolicy()
|
||||
manager.Apply(policy)
|
||||
}
|
||||
Reference in New Issue
Block a user