From 7c30c22f80da9e33578cbaf092ff4f862857ebba Mon Sep 17 00:00:00 2001 From: washbin <76929116+washbin@users.noreply.github.com> Date: Tue, 11 Oct 2022 16:57:41 +0545 Subject: [PATCH] Rename MEILISEARCH_HOST to MEILISEARCH_URL --- client_test.go | 4 ++-- docker-compose.yml | 2 +- main_test.go | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/client_test.go b/client_test.go index 65db9314..5323e084 100644 --- a/client_test.go +++ b/client_test.go @@ -1115,7 +1115,7 @@ func TestClient_GenerateTenantToken(t *testing.T) { args: args{ IndexUID: "TestGenerateTenantTokenWithoutApiKey", client: NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: "", }), APIKeyUID: GetPrivateUIDKey(), @@ -1198,7 +1198,7 @@ func TestClient_GenerateTenantToken(t *testing.T) { } client := NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: token, }) diff --git a/docker-compose.yml b/docker-compose.yml index ea53d401..1c5ddad6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,7 +10,7 @@ services: stdin_open: true working_dir: /home/package environment: - - MEILISEARCH_HOST=http://meilisearch:7700 + - MEILISEARCH_URL=http://meilisearch:7700 depends_on: - meilisearch links: diff --git a/main_test.go b/main_test.go index 6ac93350..5ab996dd 100644 --- a/main_test.go +++ b/main_test.go @@ -113,7 +113,7 @@ func GetPrivateUIDKey() (key string) { func SetUpEmptyIndex(index *IndexConfig) (resp *Index, err error) { client := NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }) task, err := client.CreateIndex(index) @@ -130,7 +130,7 @@ func SetUpEmptyIndex(index *IndexConfig) (resp *Index, err error) { func SetUpBasicIndex(indexUID string) { client := NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }) index := client.Index(indexUID) @@ -156,7 +156,7 @@ func SetUpBasicIndex(indexUID string) { func SetUpIndexWithNestedFields(indexUID string) { client := NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }) index := client.Index(indexUID) @@ -183,7 +183,7 @@ func SetUpIndexWithNestedFields(indexUID string) { func SetUpIndexForFaceting() { client := NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }) index := client.Index("indexUID") @@ -224,7 +224,7 @@ func SetUpIndexForFaceting() { var ( masterKey = "masterKey" defaultClient = NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }) defaultRankingRules = []string{ @@ -248,7 +248,7 @@ var ( ) var customClient = NewFastHTTPCustomClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, }, &fasthttp.Client{ @@ -257,13 +257,13 @@ var customClient = NewFastHTTPCustomClient(ClientConfig{ }) var timeoutClient = NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: masterKey, Timeout: 1, }) var privateClient = NewClient(ClientConfig{ - Host: getenv("MEILISEARCH_HOST", "http://localhost:7700"), + Host: getenv("MEILISEARCH_URL", "http://localhost:7700"), APIKey: GetPrivateKey(), })