Skip to content

Commit

Permalink
dup
Browse files Browse the repository at this point in the history
  • Loading branch information
hieuvubk committed Oct 21, 2024
1 parent c097fe5 commit bdfe0d7
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions tests/systemtests/genesis_io.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package systemtests

import (
"bytes"
"fmt"
"io"
"os"
"testing"
"time"

Expand Down Expand Up @@ -56,15 +53,3 @@ func GetGenesisBalance(rawGenesis []byte, addr string) sdk.Coins {
}
return r
}

// StoreTempFile creates a temporary file in the test's temporary directory with the provided content.
// It returns a pointer to the created file. Errors during the process are handled with test assertions.
func StoreTempFile(t *testing.T, content []byte) *os.File {
t.Helper()
out, err := os.CreateTemp(t.TempDir(), "")
require.NoError(t, err)
_, err = io.Copy(out, bytes.NewReader(content))
require.NoError(t, err)
require.NoError(t, out.Close())
return out
}

0 comments on commit bdfe0d7

Please sign in to comment.