19 lines
361 B
Go
19 lines
361 B
Go
// SPDX-License-Identifier: BSD-3-Clause
|
|
package conf
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestGetPlan9Config(t *testing.T) {
|
|
ndb := `ip=192.168.122.45 ipmask=255.255.255.0 ipgw=192.168.122.1
|
|
sys=chog9
|
|
dns=192.168.122.1`
|
|
|
|
act, err := getPlan9Config(ndb)
|
|
assert.Nil(t, err)
|
|
assert.Equal(t, act.Servers[0], "192.168.122.1")
|
|
}
|