@@ -41,7 +41,7 @@ type mockExecutable struct {
4141 resp * edge.Instance
4242}
4343
44- func (m * mockExecutable ) PostInstancesPayload (_ edge.PostInstancesPayload ) edge.ApiPostInstancesRequest {
44+ func (m * mockExecutable ) CreateInstancePayload (_ edge.CreateInstancePayload ) edge.ApiCreateInstanceRequest {
4545 // This method is needed to satisfy the interface. It allows chaining in buildRequest.
4646 return m
4747}
@@ -57,10 +57,10 @@ func (m *mockExecutable) Execute() (*edge.Instance, error) {
5757
5858// mockAPIClient is a mock for the client.APIClient interface
5959type mockAPIClient struct {
60- postInstancesMock edge.ApiPostInstancesRequest
60+ postInstancesMock edge.ApiCreateInstanceRequest
6161}
6262
63- func (m * mockAPIClient ) PostInstances (_ context.Context , _ , _ string ) edge.ApiPostInstancesRequest {
63+ func (m * mockAPIClient ) CreateInstance (_ context.Context , _ , _ string ) edge.ApiCreateInstanceRequest {
6464 if m .postInstancesMock != nil {
6565 return m .postInstancesMock
6666 }
@@ -80,7 +80,7 @@ func (m *mockAPIClient) GetInstance(_ context.Context, _, _, _ string) edge.ApiG
8080func (m * mockAPIClient ) GetInstanceByName (_ context.Context , _ , _ , _ string ) edge.ApiGetInstanceByNameRequest {
8181 return nil
8282}
83- func (m * mockAPIClient ) GetInstances (_ context.Context , _ , _ string ) edge.ApiGetInstancesRequest {
83+ func (m * mockAPIClient ) ListInstances (_ context.Context , _ , _ string ) edge.ApiListInstancesRequest {
8484 return nil
8585}
8686func (m * mockAPIClient ) UpdateInstance (_ context.Context , _ , _ , _ string ) edge.ApiUpdateInstanceRequest {
@@ -291,7 +291,7 @@ func TestBuildRequest(t *testing.T) {
291291 want : & createRequestSpec {
292292 ProjectID : testProjectId ,
293293 Region : testRegion ,
294- Payload : edge.PostInstancesPayload {
294+ Payload : edge.CreateInstancePayload {
295295 DisplayName : & testName ,
296296 Description : & testDescription ,
297297 PlanId : & testPlanId ,
0 commit comments