Wilken Rivera 6f23bc0d97 Vendor exoscale-import plugin
This change will vendor the new version of the exoscale-import
post-processor component, but remove all of its code from Packer. After
the v1.8.0 release this change should be removed entirely.

This vendor process is being used as a workaround for decoupling the
exoscale-import component without causing a breaking change in Packer.

Users of Exoscale are encouraged to leverage `packer init` for
installing the latest version of packer-plugin-exoscale.
2021-03-09 10:02:30 -05:00

29 lines
459 B
Go

package publicapi
import (
"net/http"
"github.com/jarcoal/httpmock"
"github.com/stretchr/testify/mock"
)
type MockClient struct {
mock.Mock
*httpmock.MockTransport
ClientWithResponsesInterface
}
func NewMockClient() *MockClient {
var c MockClient
c.MockTransport = httpmock.NewMockTransport()
return &c
}
func (c *MockClient) Do(req *http.Request) (*http.Response, error) {
hc := http.Client{Transport: c.MockTransport}
return hc.Do(req)
}