Skip to content

Commit

Permalink
internal/sum/sum.go: Remove unused NewFakeSum func
Browse files Browse the repository at this point in the history
  • Loading branch information
splaspood committed Aug 5, 2024
1 parent 5da5153 commit 1796b4f
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions internal/sum/sum.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package sum

import (
"bytes"
"context"
"io"
"os"
"os/exec"
"strings"
Expand Down Expand Up @@ -73,23 +71,6 @@ func New(host, user, pass string, opts ...Option) (*Sum, error) {
return sum, nil
}

// Return a Fake sum executor for tests
func NewFakeSum(r io.Reader) (*Sum, error) {
e := ex.NewFakeExecutor("sum")
b := bytes.Buffer{}

_, err := b.ReadFrom(r)
if err != nil {
return nil, err
}

e.SetStdout(b.Bytes())

return &Sum{
Executor: e,
}, nil
}

// Open a connection to a BMC
func (c *Sum) Open(ctx context.Context) (err error) {
return nil
Expand Down

0 comments on commit 1796b4f

Please sign in to comment.