Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: Karanjot Singh <[email protected]>
  • Loading branch information
0xquark committed May 7, 2024
1 parent 3af39d1 commit cb32fb5
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 12 deletions.
3 changes: 0 additions & 3 deletions atlan/client/atlan_tag_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ func TestIntegrationAtlanTagCache_RefreshCache(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
LoggingEnabled = false
client := NewContext()
cache := NewAtlanTagCache(client)

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

client := NewContext()
cache := NewAtlanTagCache(client)
Expand All @@ -54,7 +52,6 @@ func TestIntegrationAtlanTagCache_GetNameForID(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
LoggingEnabled = false
client := NewContext()
cache := NewAtlanTagCache(client)

Expand Down
2 changes: 1 addition & 1 deletion atlan/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (ac *AtlanClient) logHTTPStatus(response *http.Response) {
}

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

func deepCopy(original map[string]interface{}) map[string]interface{} {
Expand Down
9 changes: 4 additions & 5 deletions atlan/client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ func TestCallAPI(t *testing.T) {

// Create a new AtlanClient instance
atlanClient := &AtlanClient{
Session: http.DefaultClient,
host: mockServer.URL,
ApiKey: "mock_api_key",
loggingEnabled: false,
// logger: logger,
Session: http.DefaultClient,
host: mockServer.URL,
ApiKey: "mock_api_key",
//logger: logger,
requestParams: make(map[string]interface{}),
}

Expand Down
1 change: 0 additions & 1 deletion atlan/client/fluent_search_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ func TestIntegrationFluentSearch(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
LoggingEnabled = false
ctx := NewContext()

// Create a glossary
Expand Down
1 change: 0 additions & 1 deletion atlan/client/glossary_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ func TestIntegrationGlossary(t *testing.T) {
t.Skip("skipping integration test")
}

LoggingEnabled = false
NewContext()

glossaryGUID := testCreateGlossary(t)
Expand Down
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import (

func main() {

client.LoggingEnabled = true
ctx := client.NewContext()

ctx.SetLogger(true, "info")

qualifiedName := "default/snowflake/1714501359/RAW/WIDEWORLDIMPORTERS_SALESFORCE/WAITLIST_WORK_TYPE_HISTORY"

TableResponse, _ := client.NewFluentSearch().
Expand Down

0 comments on commit cb32fb5

Please sign in to comment.