Skip to content

Commit

Permalink
Merge pull request #243 from ayuryshev/feature/Create-skywire-cli-pk-…
Browse files Browse the repository at this point in the history
…command-238

Feature/create skywire cli pk command 238
  • Loading branch information
志宇 authored Mar 25, 2019
2 parents 563e138 + c892a85 commit ca83c65
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 92 deletions.
27 changes: 27 additions & 0 deletions cmd/skywire-cli/commands/pk.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package commands

import (
"fmt"
"log"

"github.com/spf13/cobra"
)

func init() {
rootCmd.AddCommand(pkCmd)
}

var pkCmd = &cobra.Command{
Use: "pk",
Short: "get public key of node",
Run: func(_ *cobra.Command, _ []string) {

client := rpcClient()
summary, err := client.Summary()
if err != nil {
log.Fatal("Failed to connect:", err)
}

fmt.Println(summary.PubKey)
},
}
89 changes: 0 additions & 89 deletions pkg/messaging-discovery/client/examples/client_test.go

This file was deleted.

6 changes: 3 additions & 3 deletions pkg/transport/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/skycoin/skywire/pkg/cipher"
)

func TestTransportManger(t *testing.T) {
func TestTransportManager(t *testing.T) {
client := NewDiscoveryMock()
logStore := InMemoryTransportLogStore()

Expand Down Expand Up @@ -101,7 +101,7 @@ func TestTransportManger(t *testing.T) {
mu.Unlock()
}

func TestTransportMangerReEstablishTransports(t *testing.T) {
func TestTransportManagerReEstablishTransports(t *testing.T) {
client := NewDiscoveryMock()
logStore := InMemoryTransportLogStore()

Expand Down Expand Up @@ -157,7 +157,7 @@ func TestTransportMangerReEstablishTransports(t *testing.T) {
require.NoError(t, <-errCh)
}

func TestTransportMangerLogs(t *testing.T) {
func TestTransportManagerLogs(t *testing.T) {
client := NewDiscoveryMock()
logStore1 := InMemoryTransportLogStore()
logStore2 := InMemoryTransportLogStore()
Expand Down

0 comments on commit ca83c65

Please sign in to comment.