(t *testing.T)
| 14 | ) |
| 15 | |
| 16 | func TestLoadOrGenNodeKey(t *testing.T) { |
| 17 | filePath := filepath.Join(os.TempDir(), tmrand.Str(12)+"_peer_id.json") |
| 18 | |
| 19 | nodeKey, err := LoadOrGenNodeKey(filePath) |
| 20 | assert.Nil(t, err) |
| 21 | |
| 22 | nodeKey2, err := LoadOrGenNodeKey(filePath) |
| 23 | assert.Nil(t, err) |
| 24 | |
| 25 | assert.Equal(t, nodeKey, nodeKey2) |
| 26 | } |
| 27 | |
| 28 | func TestLoadNodeKey(t *testing.T) { |
| 29 | filePath := filepath.Join(os.TempDir(), tmrand.Str(12)+"_peer_id.json") |
nothing calls this directly
no test coverage detected