Skip to content

Commit

Permalink
move netsh into its own folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rakelkar committed Sep 29, 2017
1 parent db46bb9 commit bf62f68
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
18 changes: 1 addition & 17 deletions netsh.go → netsh/netsh.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,4 @@
/*
Copyright 2016 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package netsh
package gonetsh

import (
"fmt"
Expand Down
9 changes: 8 additions & 1 deletion integration_test.go → netsh/netsh_integration_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build integration

package netsh_test
package gonetsh

import (
"testing"
Expand All @@ -17,6 +17,13 @@ func TestGetInterfaces(t *testing.T) {
t.Logf("%+v", interfaces)
}

func TestGetInterfaceByName(t *testing.T) {
h := netsh.New(exec.New())
netInterface, err := h.GetInterfaceByName("Ethernet")
assert.NoError(t, err)
t.Logf("%+v", netInterface)
}

func TestGetDefaultGatewayIfaceName(t *testing.T) {
h := netsh.New(exec.New())
ifname, err := h.GetDefaultGatewayIfaceName()
Expand Down
2 changes: 1 addition & 1 deletion netsh_test.go → netsh/netsh_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package netsh
package gonetsh

import (
"strings"
Expand Down
2 changes: 1 addition & 1 deletion testing/fake_netsh.go → netsh/testing/fake_netsh.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
package testing

import (
netsh "github.com/rakelkar/gonetsh"
netsh "github.com/rakelkar/gonetsh/netsh"
)

// no-op implementation of netsh Interface
Expand Down

0 comments on commit bf62f68

Please sign in to comment.