Files
openlan/pkg/switch/switch_test.go
2022-07-29 23:38:54 +08:00

22 lines
434 B
Go
Executable File

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")
}