|
|
@ -27,9 +27,8 @@ import ( |
|
|
|
// TestImportRaw tests clef --importraw
|
|
|
|
// TestImportRaw tests clef --importraw
|
|
|
|
func TestImportRaw(t *testing.T) { |
|
|
|
func TestImportRaw(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
|
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
keyPath := filepath.Join(t.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
t.Cleanup(func() { os.Remove(keyPath) }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t.Run("happy-path", func(t *testing.T) { |
|
|
|
t.Run("happy-path", func(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
@ -68,9 +67,8 @@ func TestImportRaw(t *testing.T) { |
|
|
|
// TestListAccounts tests clef --list-accounts
|
|
|
|
// TestListAccounts tests clef --list-accounts
|
|
|
|
func TestListAccounts(t *testing.T) { |
|
|
|
func TestListAccounts(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
|
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
keyPath := filepath.Join(t.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
t.Cleanup(func() { os.Remove(keyPath) }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t.Run("no-accounts", func(t *testing.T) { |
|
|
|
t.Run("no-accounts", func(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
@ -97,9 +95,8 @@ func TestListAccounts(t *testing.T) { |
|
|
|
// TestListWallets tests clef --list-wallets
|
|
|
|
// TestListWallets tests clef --list-wallets
|
|
|
|
func TestListWallets(t *testing.T) { |
|
|
|
func TestListWallets(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
|
keyPath := filepath.Join(os.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
keyPath := filepath.Join(t.TempDir(), fmt.Sprintf("%v-tempkey.test", t.Name())) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
os.WriteFile(keyPath, []byte("0102030405060708090a0102030405060708090a0102030405060708090a0102"), 0777) |
|
|
|
t.Cleanup(func() { os.Remove(keyPath) }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
t.Run("no-accounts", func(t *testing.T) { |
|
|
|
t.Run("no-accounts", func(t *testing.T) { |
|
|
|
t.Parallel() |
|
|
|
t.Parallel() |
|
|
|