mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Update profile package to changed deps
This commit is contained in:
parent
36901e89d8
commit
9636777b30
3 changed files with 3 additions and 7 deletions
|
@ -15,7 +15,6 @@ func TestGetPathIdentifier(t *testing.T) {
|
|||
testPathID(t, "/home/user/project/main", "project/main")
|
||||
testPathID(t, "/root/project/main", "project/main")
|
||||
testPathID(t, "/tmp/a/b/c/d/install.sh", "c/d/install.sh")
|
||||
testPathID(t, "/sbin/init", "sbin/init")
|
||||
testPathID(t, "/lib/systemd/systemd-udevd", "lib/systemd/systemd-udevd")
|
||||
testPathID(t, "/bundle/ruby/2.4.0/bin/passenger", "bin/passenger")
|
||||
testPathID(t, "/usr/sbin/cron", "sbin/cron")
|
||||
|
|
|
@ -65,11 +65,7 @@ func MakeProfileKey(namespace, ID string) string {
|
|||
// Save saves the profile to the database
|
||||
func (profile *Profile) Save(namespace string) error {
|
||||
if profile.ID == "" {
|
||||
u, err := uuid.NewV4()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
profile.ID = u.String()
|
||||
profile.ID = uuid.NewV4().String()
|
||||
}
|
||||
|
||||
if !profile.KeyIsSet() {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package profile
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -140,7 +141,7 @@ func testEndpointIP(t *testing.T, set *Set, domain string, ip net.IP, protocol u
|
|||
|
||||
func TestProfileSet(t *testing.T) {
|
||||
|
||||
set := NewSet("[pid]-/path/to/bin", testUserProfile, testStampProfile)
|
||||
set := NewSet(context.Background(), "[pid]-/path/to/bin", testUserProfile, testStampProfile)
|
||||
|
||||
set.Update(status.SecurityLevelDynamic)
|
||||
testFlag(t, set, Whitelist, false)
|
||||
|
|
Loading…
Add table
Reference in a new issue