Merged in feature/textextraction (pull request #110)
Text Extraction * bases * go * splitting * structure * movetoasync * movetoasync * settinguptrigger * reorder * storevent * standardisepollingvalidation * unittests * fixlint * fixlint * awscfg * generatesample * followthrough * tests * clena * store * externalidcleanup * clientid * local * baseunittests * putobjecttests * tests
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
"github.com/testcontainers/testcontainers-go"
|
||||
)
|
||||
|
||||
type APIName = string
|
||||
type APIName string
|
||||
|
||||
const (
|
||||
QueryAPIName APIName = queryapi.Name
|
||||
@@ -25,20 +25,21 @@ type API struct {
|
||||
}
|
||||
|
||||
type APIConfig struct {
|
||||
API API
|
||||
Cfg serviceconfig.ConfigProvider
|
||||
Network *testcontainers.DockerNetwork
|
||||
API API
|
||||
Network *testcontainers.DockerNetwork
|
||||
MockHTTP string
|
||||
}
|
||||
|
||||
func CreateAPI(t testing.TB, ctx context.Context, config *APIConfig) (*Container, func()) {
|
||||
func CreateAPI(t testing.TB, ctx context.Context, cfg serviceconfig.ConfigProvider, config *APIConfig) (*Container, func()) {
|
||||
port, err := nat.NewPort("tcp", "8080")
|
||||
require.NoError(t, err)
|
||||
|
||||
container, cleanup := createContainer(t, ctx, &containerConfig{
|
||||
Cfg: config.Cfg,
|
||||
Name: config.API.Name,
|
||||
Cfg: cfg,
|
||||
Name: string(config.API.Name),
|
||||
DownstreamQueues: config.API.DownstreamQueues,
|
||||
Network: config.Network,
|
||||
MockHTTP: config.MockHTTP,
|
||||
WaitForMsg: "⇨ http server started on [::]:8080",
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user