diff --git a/pkg/remote/client/client.go b/pkg/remote/client/client.go index 392c9783..be3a096a 100644 --- a/pkg/remote/client/client.go +++ b/pkg/remote/client/client.go @@ -5,7 +5,6 @@ import ( "net/http" "net/rpc" - "github.com/drone/drone/pkg/config" common "github.com/drone/drone/pkg/types" ) @@ -18,14 +17,15 @@ type Client struct { // New returns a new, remote datastore backend that connects // via tcp and exchanges data using Go's RPC mechanism. func New(conf *config.Config) (*Client, error) { - conn, err := net.Dial("tcp", conf.Server.Addr) - if err != nil { - return nil, err - } - client := &Client{ - rpc.NewClient(conn), - } - return client, nil + // conn, err := net.Dial("tcp", conf.Server.Addr) + // if err != nil { + // return nil, err + // } + // client := &Client{ + // rpc.NewClient(conn), + // } + // return client, nil + return nil, nil } func (c *Client) Login(token, secret string) (*common.User, error) { diff --git a/pkg/server/token_test.go b/pkg/server/token_test.go index 96f4cf37..f90dc321 100644 --- a/pkg/server/token_test.go +++ b/pkg/server/token_test.go @@ -12,7 +12,6 @@ import ( . "github.com/drone/drone/Godeps/_workspace/src/github.com/franela/goblin" "github.com/drone/drone/Godeps/_workspace/src/github.com/gin-gonic/gin" "github.com/drone/drone/Godeps/_workspace/src/github.com/stretchr/testify/mock" - "github.com/drone/drone/pkg/config" "github.com/drone/drone/pkg/server/recorder" "github.com/drone/drone/pkg/server/session" "github.com/drone/drone/pkg/store/mock" @@ -60,10 +59,7 @@ func TestToken(t *testing.T) { ctx.Set("datastore", store) ctx.Set("user", &types.User{Login: "Freya"}) - conf := &config.Config{} - conf.Session.Secret = "Otto" - ctx.Set("settings", conf) - ctx.Set("session", session.New(conf.Session.Secret)) + ctx.Set("session", session.New("Otto")) // prepare the mock store.On("AddToken", mock.AnythingOfType("*types.Token")).Return(test.storeErr).Once() @@ -98,11 +94,7 @@ func TestToken(t *testing.T) { ctx.Set("datastore", store) ctx.Set("user", &types.User{Login: "Freya"}) - - conf := &config.Config{} - conf.Session.Secret = "Otto" - ctx.Set("settings", conf) - ctx.Set("session", session.New(conf.Session.Secret)) + ctx.Set("session", session.New("Otto")) // prepare the mock store.On("TokenLabel", mock.AnythingOfType("*types.User"), test.inLabel).Return(test.outToken, test.errTokenLabel).Once()