(t *testing.T)
| 40 | } |
| 41 | |
| 42 | func TestNodeKeySaveAs(t *testing.T) { |
| 43 | filePath := filepath.Join(os.TempDir(), tmrand.Str(12)+"_peer_id.json") |
| 44 | |
| 45 | assert.NoFileExists(t, filePath) |
| 46 | |
| 47 | privKey := ed25519.GenPrivKey() |
| 48 | nodeKey := &NodeKey{ |
| 49 | PrivKey: privKey, |
| 50 | } |
| 51 | err := nodeKey.SaveAs(filePath) |
| 52 | assert.NoError(t, err) |
| 53 | assert.FileExists(t, filePath) |
| 54 | } |
| 55 | |
| 56 | //---------------------------------------------------------- |
| 57 |
nothing calls this directly
no test coverage detected