Skip to content

Commit

Permalink
chore: hardcode 127.0.0.1 for testing on GH action
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Feb 19, 2024
1 parent 67a5abf commit b602505
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions modules/qdrant/qdrant.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,7 @@ func (c *QdrantContainer) RESTEndpoint(ctx context.Context) (string, error) {
return "", fmt.Errorf("failed to get container port: %w", err)
}

provider, err := testcontainers.NewDockerProvider()
if err != nil {
return "", err
}
defer provider.Close()

host, err := provider.DaemonHost(ctx)
if err != nil {
return "", fmt.Errorf("failed to get container host")
}

return fmt.Sprintf("http://%s:%s", host, containerPort.Port()), nil
return fmt.Sprintf("http://127.0.0.1:%s", containerPort.Port()), nil
}

// GRPCEndpoint returns the gRPC endpoint of the Qdrant container
Expand All @@ -64,18 +53,7 @@ func (c *QdrantContainer) GRPCEndpoint(ctx context.Context) (string, error) {
return "", fmt.Errorf("failed to get container port: %w", err)
}

provider, err := testcontainers.NewDockerProvider()
if err != nil {
return "", err
}
defer provider.Close()

host, err := provider.DaemonHost(ctx)
if err != nil {
return "", fmt.Errorf("failed to get container host")
}

return fmt.Sprintf("%s:%s", host, containerPort.Port()), nil
return fmt.Sprintf("127.0.0.1:%s", containerPort.Port()), nil
}

// WebUI returns the web UI endpoint of the Qdrant container
Expand Down

0 comments on commit b602505

Please sign in to comment.