Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

myst-161 connection status connecting #70

Merged
merged 12 commits into from Dec 27, 2017

Conversation

Projects
None yet
3 participants
@shroomist
Copy link
Contributor

commented Dec 26, 2017

No description provided.

@shroomist shroomist requested review from Waldz and tadovas Dec 26, 2017

clientSession, err := manager.mysteriumClient.SessionCreate(NodeKey)
if err != nil {
manager.status = statusError(err)
return err
}
manager.status = statusConnecting(clientSession.Id)

This comment has been minimized.

Copy link
@tadovas

tadovas Dec 27, 2017

Member

First of all sessionid comming from discovery service will be removed in the future. There is no point exposing it when status is connecting as a lot of can happen even before connection is really established. There fore status connecting WITHOUT session id was done intentionally. @Waldz your word is needed here.

This comment has been minimized.

Copy link
@Waldz

Waldz Dec 27, 2017

Member
  • Just dont use variable from endpoint mysteriumClient.SessionCreate()
  • Status "connecting" should start in very beggining of Connect()
assert.JSONEq(
t,
`{
"status" : "Connecting",

This comment has been minimized.

Copy link
@tadovas

tadovas Dec 27, 2017

Member

Formatting.

@@ -7,7 +7,7 @@ import (
type State string

const (
NotConnected = State("NotConnected")
NotConnected = State("Not Connected")

This comment has been minimized.

Copy link
@Waldz

Waldz Dec 27, 2017

Member

Why spaces?

assert.Equal(t, http.StatusOK, resp.Code)
assert.JSONEq(
t,
`{

This comment has been minimized.

Copy link
@Waldz

Waldz Dec 27, 2017

Member

Formating

@@ -63,7 +63,30 @@ func TestNotConnectedStateIsReturnedWhenNoConnection(t *testing.T) {
resp.Body.String())
}

func TestConnectedStateAndSessionIdIsReturnedWhenIsConnection(t *testing.T) {
func TestConnectedStateAndSessionIdIsReturnedWhenIsConnecting(t *testing.T) {

This comment has been minimized.

Copy link
@Waldz

Waldz Dec 27, 2017

Member

Wrong name of test

@Waldz

Waldz approved these changes Dec 27, 2017

@shroomist shroomist merged commit 5035225 into master Dec 27, 2017

@Waldz Waldz deleted the feature/MYST-161-tequila-conn-status branch Dec 27, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.