clone from danieldin95

This commit is contained in:
sicheng
2022-07-29 23:38:54 +08:00
commit ac4f79bbf4
1931 changed files with 568263 additions and 0 deletions

21
pkg/switch/switch_test.go Executable file
View File

@@ -0,0 +1,21 @@
package _switch
import (
"fmt"
"github.com/luscis/openlan/pkg/cache"
"github.com/stretchr/testify/assert"
"testing"
)
func TestSwitch_LoadPass(t *testing.T) {
sw := &Switch{}
sw.LoadPass("../../.password.no")
sw.LoadPass("../../packaging/resource/password.example")
for user := range cache.User.List() {
if user == nil {
break
}
fmt.Printf("%v\n", user)
}
assert.Equal(t, 2, cache.User.Users.Len(), "notEqual")
}