25 lines
611 B
Go
25 lines
611 B
Go
// 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)
|
|
}
|