Skip to content

Commit cb32fb5

Browse files
committed
Fix tests
Signed-off-by: Karanjot Singh <[email protected]>
1 parent 3af39d1 commit cb32fb5

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

atlan/client/atlan_tag_cache_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ func TestIntegrationAtlanTagCache_RefreshCache(t *testing.T) {
1010
if testing.Short() {
1111
t.Skip("skipping integration test")
1212
}
13-
LoggingEnabled = false
1413
client := NewContext()
1514
cache := NewAtlanTagCache(client)
1615

@@ -27,7 +26,6 @@ func TestIntegrationAtlanTagCache_GetIDForName(t *testing.T) {
2726
if testing.Short() {
2827
t.Skip("skipping integration test")
2928
}
30-
LoggingEnabled = false
3129

3230
client := NewContext()
3331
cache := NewAtlanTagCache(client)
@@ -54,7 +52,6 @@ func TestIntegrationAtlanTagCache_GetNameForID(t *testing.T) {
5452
if testing.Short() {
5553
t.Skip("skipping integration test")
5654
}
57-
LoggingEnabled = false
5855
client := NewContext()
5956
cache := NewAtlanTagCache(client)
6057

atlan/client/client.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ func (ac *AtlanClient) logHTTPStatus(response *http.Response) {
303303
}
304304

305305
func (ac *AtlanClient) logResponse(responseJSON []byte) {
306-
ac.logger.Infof("<== __call_api", string(responseJSON))
306+
ac.logger.Infof("<== __call_api %s", string(responseJSON))
307307
}
308308

309309
func deepCopy(original map[string]interface{}) map[string]interface{} {

atlan/client/client_test.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ func TestCallAPI(t *testing.T) {
4040

4141
// Create a new AtlanClient instance
4242
atlanClient := &AtlanClient{
43-
Session: http.DefaultClient,
44-
host: mockServer.URL,
45-
ApiKey: "mock_api_key",
46-
loggingEnabled: false,
47-
// logger: logger,
43+
Session: http.DefaultClient,
44+
host: mockServer.URL,
45+
ApiKey: "mock_api_key",
46+
//logger: logger,
4847
requestParams: make(map[string]interface{}),
4948
}
5049

atlan/client/fluent_search_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ func TestIntegrationFluentSearch(t *testing.T) {
1212
if testing.Short() {
1313
t.Skip("skipping integration test")
1414
}
15-
LoggingEnabled = false
1615
ctx := NewContext()
1716

1817
// Create a glossary

atlan/client/glossary_client_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ func TestIntegrationGlossary(t *testing.T) {
1414
t.Skip("skipping integration test")
1515
}
1616

17-
LoggingEnabled = false
1817
NewContext()
1918

2019
glossaryGUID := testCreateGlossary(t)

main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import (
88

99
func main() {
1010

11-
client.LoggingEnabled = true
1211
ctx := client.NewContext()
1312

13+
ctx.SetLogger(true, "info")
14+
1415
qualifiedName := "default/snowflake/1714501359/RAW/WIDEWORLDIMPORTERS_SALESFORCE/WAITLIST_WORK_TYPE_HISTORY"
1516

1617
TableResponse, _ := client.NewFluentSearch().

0 commit comments

Comments
 (0)