Skip to content

Commit

Permalink
chore: revert #1019 (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nandu-pns authored and sanderblue committed Apr 18, 2023
1 parent ff52dc2 commit 69f5ff6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 692 deletions.
122 changes: 14 additions & 108 deletions pkg/entities/entities_api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 0 additions & 66 deletions pkg/entities/entity_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,6 @@ func TestIntegrationSearchEntities(t *testing.T) {

require.NoError(t, err)
require.Greater(t, len(actual.Results.Entities), 0)

params = EntitySearchQueryBuilder{
Name: "Key Transaction",
}

actual, err = client.GetEntitySearch(
EntitySearchOptions{},
"",
params,
[]EntitySearchSortCriteria{},
)

require.NoError(t, err)
require.Greater(t, len(actual.Results.Entities), 0)
}

func TestIntegrationSearchEntitiesByQuery(t *testing.T) {
Expand All @@ -77,18 +63,6 @@ func TestIntegrationSearchEntitiesByQuery(t *testing.T) {

require.NoError(t, err)
require.Greater(t, len(actual.Results.Entities), 0)

query_kt := "name = 'get /' and type = 'KEY_TRANSACTION'"

actual_kt, err_kt := client.GetEntitySearchByQuery(
EntitySearchOptions{},
query_kt,
[]EntitySearchSortCriteria{},
)

require.NoError(t, err_kt)
require.Greater(t, len(actual_kt.Results.Entities), 0)

}

func TestIntegrationSearchEntities_domain(t *testing.T) {
Expand Down Expand Up @@ -288,43 +262,3 @@ func newIntegrationTestClient(t *testing.T) Entities {

return New(tc)
}

// Looking at a Key Transaction, and the result set here.
func TestIntegrationGetEntity_KeyTransactionEntity(t *testing.T) {
t.Parallel()

client := newIntegrationTestClient(t)

result, err := client.GetEntity("MzgwNjUyNnxFWFR8S0VZX1RSQU5TQUNUSU9OfDE1NDA0MTAxNDU4NjUwMjAwOTc3")

if e, ok := err.(*http.GraphQLErrorResponse); ok {
if !e.IsDeprecated() {
require.NoError(t, e)
}
}
require.NotNil(t, (*result))

actual := (*result).(*KeyTransactionEntity)

assert.Equal(t, 3806526, actual.AccountID)
assert.Equal(t, "get /", actual.Name)
assert.Equal(t, "KEY_TRANSACTION", actual.Type)

}

func TestIntegrationGetEntities_KeyTransaction(t *testing.T) {
t.Parallel()

client := newIntegrationTestClient(t)

// GUID of Key Transaction
guids := []common.EntityGUID{"MzgwNjUyNnxFWFR8S0VZX1RSQU5TQUNUSU9OfDE1NDA0MTAxNDU4NjUwMjAwOTc3"}
actual, err := client.GetEntities(guids)

if e, ok := err.(*http.GraphQLErrorResponse); ok {
if !e.IsDeprecated() {
require.NoError(t, e)
}
}
require.Greater(t, len((*actual)), 0)
}
Loading

0 comments on commit 69f5ff6

Please sign in to comment.