github.com/oweisse/u-root@v0.0.0-20181109060735-d005ad25fef1/pkg/wifi/native_test.go (about) 1 // Copyright 2018 the u-root Authors. All rights reserved 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package wifi 6 7 import ( 8 "testing" 9 ) 10 11 func TestNative(t *testing.T) { 12 // Some things may fail as there may be no wlan or we might not 13 // have the right privs. So just bail out of the test if some early 14 // ops fail. 15 w, err := NewNativeWorker("wlan0") 16 if err != nil { 17 t.Log(err) 18 return 19 } 20 t.Logf("Native is %v", w) 21 err = w.Connect() 22 if err != nil { 23 t.Log(err) 24 return 25 } 26 }