Skip to content

Commit d679bdd

Browse files
authored
Merge pull request #2152 from argentpapa/main
optimize(test): using t.TempDir() replace os.MkdirTemp
2 parents a46d1ce + c1059ca commit d679bdd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

x/wasm/keeper/genesis_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -656,9 +656,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) {
656656

657657
func setupKeeper(t *testing.T) (*Keeper, sdk.Context) {
658658
t.Helper()
659-
tempDir, err := os.MkdirTemp("", "wasm")
660-
require.NoError(t, err)
661-
t.Cleanup(func() { os.RemoveAll(tempDir) })
659+
tempDir := t.TempDir()
662660

663661
keyWasm := storetypes.NewKVStoreKey(types.StoreKey)
664662

0 commit comments

Comments
 (0)