Fix print formatting errors
This commit is contained in:
@@ -63,7 +63,7 @@ func NewClient(instance *types.Instance, proxyHost string) (*client.Client, erro
|
|||||||
|
|
||||||
dc, err := client.NewClient(durl, api.DefaultVersion, cli, nil)
|
dc, err := client.NewClient(durl, api.DefaultVersion, cli, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("Could not connect to DinD docker daemon", err)
|
return nil, fmt.Errorf("Could not connect to DinD docker daemon: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return dc, nil
|
return dc, nil
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ func NewSession(rw http.ResponseWriter, req *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
if d > playground.DefaultSessionDuration {
|
if d > playground.DefaultSessionDuration {
|
||||||
log.Printf("Specified session duration was %s but maximum allowed by this playground is %d\n", d.String(), playground.DefaultSessionDuration.String())
|
log.Printf("Specified session duration was %s but maximum allowed by this playground is %s\n", d.String(), playground.DefaultSessionDuration.String())
|
||||||
rw.WriteHeader(http.StatusBadRequest)
|
rw.WriteHeader(http.StatusBadRequest)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ func TestInstanceNew_WithCustomHostname(t *testing.T) {
|
|||||||
_s.On("SessionCount").Return(1, nil)
|
_s.On("SessionCount").Return(1, nil)
|
||||||
_s.On("ClientCount").Return(0, nil)
|
_s.On("ClientCount").Return(0, nil)
|
||||||
_s.On("InstanceCount").Return(0, nil)
|
_s.On("InstanceCount").Return(0, nil)
|
||||||
_s.On("InstanceFindBySessionId", "aaaabbbbcccc").Return([]*types.Instance{}, nil)
|
|
||||||
|
|
||||||
var nilArgs []interface{}
|
var nilArgs []interface{}
|
||||||
_e.M.On("Emit", event.SESSION_NEW, "aaaabbbbcccc", nilArgs).Return()
|
_e.M.On("Emit", event.SESSION_NEW, "aaaabbbbcccc", nilArgs).Return()
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ func (s *scheduler) Start() error {
|
|||||||
if _, found := s.playgrounds[session.PlaygroundId]; !found {
|
if _, found := s.playgrounds[session.PlaygroundId]; !found {
|
||||||
playground, err := s.storage.PlaygroundGet(session.PlaygroundId)
|
playground, err := s.storage.PlaygroundGet(session.PlaygroundId)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("Could not find playground %s\n")
|
log.Printf("Could not find playground %s\n", session.PlaygroundId)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
s.playgrounds[playground.Id] = playground
|
s.playgrounds[playground.Id] = playground
|
||||||
|
|||||||
Reference in New Issue
Block a user