Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmanilo committed Sep 20, 2023
1 parent 4816ea7 commit 7082ce6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion twingate/internal/client/query/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func TestReadResourcesByNameQueryToModel(t *testing.T) {
RemoteNetworkID: "resource-network-id",
IsVisible: &boolTrue,
IsBrowserShortcutEnabled: &boolFalse,
Protocols: model.DefaultProtocols(),
},
},
},
Expand Down Expand Up @@ -796,7 +797,7 @@ func TestProtocolToModel(t *testing.T) {
}{
{
protocol: nil,
expected: nil,
expected: model.DefaultProtocol(),
},
{
protocol: &Protocol{
Expand Down
10 changes: 5 additions & 5 deletions twingate/internal/test/client/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -668,11 +668,11 @@ func TestClientResourcesReadAllOk(t *testing.T) {
var defaultBool bool

expected := []*model.Resource{
{ID: "resource1", Name: "tf-acc-resource1", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool},
{ID: "resource2", Name: "resource2", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool},
{ID: "resource3", Name: "tf-acc-resource3", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool},
{ID: "resource4", Name: "tf-acc-resource4", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool},
{ID: "resource5", Name: "tf-acc-resource5", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool},
{ID: "resource1", Name: "tf-acc-resource1", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool, Protocols: model.DefaultProtocols()},
{ID: "resource2", Name: "resource2", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool, Protocols: model.DefaultProtocols()},
{ID: "resource3", Name: "tf-acc-resource3", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool, Protocols: model.DefaultProtocols()},
{ID: "resource4", Name: "tf-acc-resource4", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool, Protocols: model.DefaultProtocols()},
{ID: "resource5", Name: "tf-acc-resource5", IsVisible: &defaultBool, IsBrowserShortcutEnabled: &defaultBool, Protocols: model.DefaultProtocols()},
}

// response JSON
Expand Down

0 comments on commit 7082ce6

Please sign in to comment.