mirror of
https://github.com/luscis/openlan.git
synced 2025-10-05 16:47:11 +08:00
21 lines
346 B
Go
Executable File
21 lines
346 B
Go
Executable File
package config
|
|
|
|
import (
|
|
"github.com/stretchr/testify/assert"
|
|
"testing"
|
|
)
|
|
|
|
func TestBridge(t *testing.T) {
|
|
br := &Bridge{
|
|
Network: "123",
|
|
}
|
|
br.Correct()
|
|
assert.Equal(t, "br-123", br.Name, "be the same.")
|
|
|
|
br1 := &Bridge{
|
|
Network: "1234567890123456.cc",
|
|
}
|
|
br1.Correct()
|
|
assert.Equal(t, "br-123456789012", br1.Name, "be the same.")
|
|
}
|