Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
number571 committed Nov 4, 2024
1 parent 4b102c8 commit 2c8e9b9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package handler

import (
"context"
"fmt"
"net/http"
"strings"
"testing"
"time"

"github.com/number571/hidden-lake/internal/applications/remoter/pkg/client"
hlr_settings "github.com/number571/hidden-lake/internal/applications/remoter/pkg/settings"
hls_client "github.com/number571/hidden-lake/internal/service/pkg/client"
testutils "github.com/number571/hidden-lake/test/utils"
)
Expand Down Expand Up @@ -46,11 +44,7 @@ func TestIncomingExecHTTP(t *testing.T) {
)

msg := "hello, world!"
rsp, err := hlrClient.Exec(
ctx,
"test_recv",
fmt.Sprintf("echo%s%s", hlr_settings.CExecSeparator, msg),
)
rsp, err := hlrClient.Exec(ctx, "test_recv", "echo", msg)
if err != nil {
t.Error(err)
return
Expand Down
2 changes: 1 addition & 1 deletion internal/applications/remoter/pkg/client/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ func (p *sBuilder) Exec(pCmd ...string) hls_request.IRequest {
WithHead(map[string]string{
hlr_settings.CHeaderPassword: p.fPassword,
}).
WithBody([]byte(strings.Join(pCmd, " ")))
WithBody([]byte(strings.Join(pCmd, hlr_settings.CExecSeparator)))
}
2 changes: 1 addition & 1 deletion test/result/badge_codelines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2c8e9b9

Please sign in to comment.