Skip to content

Commit

Permalink
Timeouts tests to be unit test to be able to run without TF_ACC
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushrangwala committed Sep 20, 2023
1 parent 37fa098 commit e5e0c96
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions equinix/resource_network_bgp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package equinix

import (
"context"
"github.com/packethost/packngo"
"testing"
"time"

Expand Down Expand Up @@ -101,20 +100,6 @@ func (r *mockedBGPUpdateRequest) Execute() error {
return nil
}

var _ packngo.BGPConfigService = &mockBgpConfigService{}

type mockBgpConfigService struct {
GetFn func(projectID string, getOpt *packngo.GetOptions) (*packngo.BGPConfig, *packngo.Response, error)
CreateFn func(projectID string, request packngo.CreateBGPConfigRequest) (*packngo.Response, error)
}

func (s *mockBgpConfigService) Get(projectID string, getOpt *packngo.GetOptions) (*packngo.BGPConfig, *packngo.Response, error) {
return s.GetFn(projectID, getOpt)
}
func (s *mockBgpConfigService) Create(projectID string, request packngo.CreateBGPConfigRequest) (*packngo.Response, error) {
return s.CreateFn(projectID, request)
}

func TestNetworkBGP_createUpdateRequest(t *testing.T) {
// given
req := &mockedBGPUpdateRequest{data: make(map[string]interface{})}
Expand Down

0 comments on commit e5e0c96

Please sign in to comment.