mirror of
https://github.com/akvorado/akvorado.git
synced 2025-12-12 06:24:10 +01:00
common: use 127.0.0.1 instead of localhost for external test services
This commit is contained in:
@@ -20,7 +20,7 @@ import (
|
|||||||
// SetupClickHouse configures a client to use for testing.
|
// SetupClickHouse configures a client to use for testing.
|
||||||
func SetupClickHouse(t *testing.T, r *reporter.Reporter) *Component {
|
func SetupClickHouse(t *testing.T, r *reporter.Reporter) *Component {
|
||||||
t.Helper()
|
t.Helper()
|
||||||
chServer := helpers.CheckExternalService(t, "ClickHouse", []string{"clickhouse", "localhost"}, "9000")
|
chServer := helpers.CheckExternalService(t, "ClickHouse", []string{"clickhouse", "127.0.0.1"}, "9000")
|
||||||
config := DefaultConfiguration()
|
config := DefaultConfiguration()
|
||||||
config.Servers = []string{chServer}
|
config.Servers = []string{chServer}
|
||||||
config.DialTimeout = 100 * time.Millisecond
|
config.DialTimeout = 100 * time.Millisecond
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ func TestCacheByRequestBody(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRedis(t *testing.T) {
|
func TestRedis(t *testing.T) {
|
||||||
server := helpers.CheckExternalService(t, "Redis", []string{"redis", "localhost"}, "6379")
|
server := helpers.CheckExternalService(t, "Redis", []string{"redis", "127.0.0.1"}, "6379")
|
||||||
client := redis.NewClient(&redis.Options{
|
client := redis.NewClient(&redis.Options{
|
||||||
Addr: server,
|
Addr: server,
|
||||||
DB: 10,
|
DB: 10,
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import (
|
|||||||
|
|
||||||
// SetupKafkaBroker configures a client to use for testing.
|
// SetupKafkaBroker configures a client to use for testing.
|
||||||
func SetupKafkaBroker(t *testing.T) (sarama.Client, []string) {
|
func SetupKafkaBroker(t *testing.T) (sarama.Client, []string) {
|
||||||
broker := helpers.CheckExternalService(t, "Kafka", []string{"kafka", "localhost"}, "9092")
|
broker := helpers.CheckExternalService(t, "Kafka", []string{"kafka", "127.0.0.1"}, "9092")
|
||||||
|
|
||||||
// Wait for broker to be ready
|
// Wait for broker to be ready
|
||||||
saramaConfig := sarama.NewConfig()
|
saramaConfig := sarama.NewConfig()
|
||||||
|
|||||||
Reference in New Issue
Block a user