mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
feat: add GH workflow and example test
This commit is contained in:
26
pkg/network/network_test.go
Normal file
26
pkg/network/network_test.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package network
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDefaultSTAConfig(t *testing.T) {
|
||||
uuid := uuid.New()
|
||||
cfg := DefaultSTAConfig(uuid, "test", "test", true)
|
||||
assert.Equal(t, "802-11-wireless", cfg.Type)
|
||||
assert.Equal(t, "test", cfg.ID)
|
||||
assert.Equal(t, "test", cfg.SSID)
|
||||
assert.Equal(t, true, cfg.AutoConnect)
|
||||
}
|
||||
|
||||
func TestDefaultAPConfig(t *testing.T) {
|
||||
uuid := uuid.New()
|
||||
cfg := DefaultAPConfig(uuid, "test", "test", true)
|
||||
assert.Equal(t, "802-11-wireless", cfg.Type)
|
||||
assert.Equal(t, "test", cfg.ID)
|
||||
assert.Equal(t, "test", cfg.SSID)
|
||||
assert.Equal(t, true, cfg.AutoConnect)
|
||||
}
|
||||
Reference in New Issue
Block a user