-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* corrected PlugSeed * corrected dbPath * Update go-test.yml * Update go-test.yml * Update go-test.yml * Update keystore.go
- Loading branch information
Showing
4 changed files
with
69 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
package blockchain | ||
|
||
import ( | ||
"fmt" | ||
"context" | ||
"testing" | ||
) | ||
|
||
func TestSimpleKeyStore(t *testing.T) { | ||
fmt.Printf("test removed") | ||
keyStore := NewSimpleKeyStorer("") | ||
err := keyStore.SaveKey(context.Background(), "dummy") | ||
if err != nil { | ||
t.Errorf("while save key: %v", err) | ||
} | ||
key, err := keyStore.LoadKey(context.Background()) | ||
if err != nil { | ||
t.Errorf("while load key: %v", err) | ||
} | ||
if string(key) != "dummy" { | ||
t.Errorf("error loading the stored key: %v != dummy", string(key)) | ||
} | ||
} |