Skip to content

Commit

Permalink
update linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
aabughosh committed Jul 28, 2024
1 parent be4fdf3 commit 758bd08
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func main() {
cs, err := clientutil.New(kubeconfig)
if err != nil {
panic("must set the KUBECONFIG environment variable")

}

var env commatrix.Env
switch envStr {
case "baremetal":
Expand Down
1 change: 0 additions & 1 deletion commatrix/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
)

func GenerateSS(cs *clientutil.ClientSet) (ssMat *types.ComMatrix, ssOutTCP, ssOutUDP []byte, err error) {

nodesList, err := cs.CoreV1Interface.Nodes().List(context.TODO(), metav1.ListOptions{})
if err != nil {
return nil, nil, nil, err
Expand Down
1 change: 0 additions & 1 deletion debug/debug.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/openshift-kni/commatrix/client"
)

// DebugPodInterface defines the methods of DebugPod that we need to mock
type DebugPodInterface interface {
ExecWithRetry(command string, interval time.Duration, duration time.Duration) ([]byte, error)
Clean() error
Expand Down
7 changes: 3 additions & 4 deletions debug/debug_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,23 @@ import (
"github.com/stretchr/testify/mock"
)

// MockDebugPod is a mock type for the DebugPodInterface// MockDebugPod is a mock type for the DebugPodInterface
type MockDebugPod struct {
mock.Mock
}

// ExecWithRetry mocks the ExecWithRetry method
// ExecWithRetry mocks the ExecWithRetry method.
func (m *MockDebugPod) ExecWithRetry(command string, interval time.Duration, duration time.Duration) ([]byte, error) {
args := m.Called(command, interval, duration)
return args.Get(0).([]byte), args.Error(1)
}

// Clean mocks the Clean method
// Clean mocks the Clean method.
func (m *MockDebugPod) Clean() error {
args := m.Called()
return args.Error(0)
}

// GetNodeName mocks the GetNodeName method
// GetNodeName mocks the GetNodeName method.
func (m *MockDebugPod) GetNodeName() string {
args := m.Called()
return args.String(0)
Expand Down
4 changes: 0 additions & 4 deletions ss/ss.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ import (
"github.com/openshift-kni/commatrix/types"
)

//type SSGenerator interface {
// CreateSSOutputFromNode(debugPod debug.DebugPodInterface, node *corev1.Node) ([]types.ComDetails, []byte, []byte, error)
//}

const (
localAddrPortFieldIdx = 3
interval = time.Millisecond * 500
Expand Down

0 comments on commit 758bd08

Please sign in to comment.