mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-29 19:41:15 +02:00
/exec API: drop session reconnection support (#487)
This commit is contained in:
@@ -71,7 +71,6 @@ type ExecSessionOptions struct {
|
||||
Env map[string]string
|
||||
Workdir string
|
||||
WaitSeconds uint16
|
||||
Session string
|
||||
}
|
||||
|
||||
func (service *VMsService) Create(ctx context.Context, vm *v1.VM) error {
|
||||
@@ -253,9 +252,6 @@ func (service *VMsService) ExecSession(
|
||||
if options.Workdir != "" {
|
||||
params["workdir"] = options.Workdir
|
||||
}
|
||||
if options.Session != "" {
|
||||
params["session"] = options.Session
|
||||
}
|
||||
|
||||
return service.client.wsRequestRaw(ctx, fmt.Sprintf("vms/%s/exec", url.PathEscape(name)),
|
||||
params)
|
||||
|
||||
@@ -20,7 +20,7 @@ func TestHTTPClientForWebSocketHonorsWait(t *testing.T) {
|
||||
require.Same(t, devClient.httpClient.Transport, httpClient.Transport)
|
||||
}
|
||||
|
||||
func TestExecSessionBuildsReconnectableQuery(t *testing.T) {
|
||||
func TestExecSessionBuildsQuery(t *testing.T) {
|
||||
var query map[string][]string
|
||||
|
||||
server := httptest.NewServer(
|
||||
@@ -51,7 +51,6 @@ func TestExecSessionBuildsReconnectableQuery(t *testing.T) {
|
||||
Env: map[string]string{"GREETING": "hello"},
|
||||
Workdir: "/tmp",
|
||||
WaitSeconds: 7,
|
||||
Session: "resume-me",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer conn.CloseNow()
|
||||
@@ -64,5 +63,4 @@ func TestExecSessionBuildsReconnectableQuery(t *testing.T) {
|
||||
require.Equal(t, []string{"hello"}, query["env[GREETING]"])
|
||||
require.Equal(t, []string{"/tmp"}, query["workdir"])
|
||||
require.Equal(t, []string{"7"}, query[waitParameterName])
|
||||
require.Equal(t, []string{"resume-me"}, query["session"])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user