Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(bug): In TestExportImport, delete imported key, check if original exists #2472

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tm2/pkg/crypto/keys/keybase_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,14 @@ func TestExportImport(t *testing.T) {
require.Equal(t, john.GetPubKey().Address(), johnAddr)
require.Equal(t, john.GetName(), "john")
require.Equal(t, john, john2)

// Delete the imported key
err = cstore.Delete("john2", "secretcpw", false)
require.NoError(t, err)
// The original key should still exist
has, err := cstore.HasByName("john")
require.NoError(t, err)
require.True(t, has)
}

func TestExportImportPubKey(t *testing.T) {
Expand Down
Loading