Skip to content

Commit

Permalink
get rid of "smart" http client, we depreciated it
Browse files Browse the repository at this point in the history
  • Loading branch information
ensary committed Feb 13, 2025
1 parent ff082d4 commit 6691171
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 46 deletions.
3 changes: 2 additions & 1 deletion mock_roundtripper_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 3 additions & 44 deletions producer_post_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,11 @@ import (
"net/url"
"testing"

httpclient "github.com/asecurityteam/component-httpclient"

gomock "github.com/golang/mock/gomock"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/require"
)

var transportdConfig = `openapi: 3.0.0
x-transportd:
backends:
- app
app:
host: "http://app:8081"
pool:
ttl: "24h"
count: 1
info:
version: 1.0.0
title: "Example"
description: "An example"
contact:
name: Security Development
email: [email protected]
license:
name: Apache 2.0
url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
paths:
/healthcheck:
get:
description: "Liveness check."
responses:
"200":
description: "Success."
x-transportd:
backend: app
`
httpclient "github.com/asecurityteam/component-httpclient"
)

func TestPostProducerCantMarshal(t *testing.T) {
ctrl := gomock.NewController(t)
Expand Down Expand Up @@ -197,17 +167,6 @@ func TestProducerPOSTComponent_New(t *testing.T) {
}(),
wantProducer: true,
},
{
name: "smart http",
conf: func() *POSTConfig {
conf := NewPOSTComponent().Settings()
conf.Endpoint = "http://localhost"
conf.HTTPClient.Type = httpclient.TypeSmart
conf.HTTPClient.Smart.OpenAPI = transportdConfig
return conf
}(),
wantProducer: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"context"
"testing"

"github.com/asecurityteam/settings"
"github.com/stretchr/testify/require"

"github.com/asecurityteam/settings"
)

var benthosConfig = `http:
Expand Down

0 comments on commit 6691171

Please sign in to comment.