Expose methods required for the stream sync service #147
| @ -20,7 +20,7 @@ import ( | ||||
| 
 | ||||
| 	"git.grassecon.net/urdt/ussd/common" | ||||
| 	"github.com/alecthomas/assert/v2" | ||||
| 	"github.com/grassrootseconomics/eth-custodial/pkg/api" | ||||
| //	"github.com/grassrootseconomics/eth-custodial/pkg/api"
 | ||||
| 	testdataloader "github.com/peteole/testdata-loader" | ||||
| 	"github.com/stretchr/testify/require" | ||||
| 
 | ||||
| @ -1048,7 +1048,7 @@ func TestCheckAccountStatus(t *testing.T) { | ||||
| 	tests := []struct { | ||||
| 		name           string | ||||
| 		input          []byte | ||||
| 		serverResponse *api.OKResponse | ||||
| 		//serverResponse *api.OKResponse
 | ||||
| 		response       *models.TrackStatusResult | ||||
| 		expectedResult resource.Result | ||||
| 	}{ | ||||
| @ -1086,7 +1086,8 @@ func TestCheckAccountStatus(t *testing.T) { | ||||
| 			// Define expected interactions with the mock
 | ||||
| 			mockDataStore.On("ReadEntry", ctx, sessionId, common.DATA_PUBLIC_KEY).Return(tt.input, nil) | ||||
| 
 | ||||
| 			mockCreateAccountService.On("TrackAccountStatus", string(tt.input)).Return(tt.serverResponse, nil) | ||||
| 			//mockCreateAccountService.On("TrackAccountStatus", string(tt.input)).Return(tt.serverResponse, nil)
 | ||||
| 			mockCreateAccountService.On("TrackAccountStatus", string(tt.input)).Return(tt.response, nil) | ||||
| 			mockDataStore.On("WriteEntry", ctx, sessionId, common.DATA_ACCOUNT_STATUS, status).Return(nil).Maybe() | ||||
| 
 | ||||
| 			// Call the method under test
 | ||||
|  | ||||
| @ -36,10 +36,10 @@ type AccountService struct { | ||||
| //   - string: The status of the transaction as a string. If there is an error during the request or processing, this will be an empty string.
 | ||||
| //   - error: An error if any occurred during the HTTP request, reading the response, or unmarshalling the JSON data.
 | ||||
| //     If no error occurs, this will be nil
 | ||||
| func (as *AccountService) TrackAccountStatus(ctx context.Context, trackingId string) (*models.TrackStatusResult, error) { | ||||
| func (as *AccountService) TrackAccountStatus(ctx context.Context, publicKey string) (*models.TrackStatusResult, error) { | ||||
| 	var r models.TrackStatusResult | ||||
| 
 | ||||
| 	ep, err := url.JoinPath(config.TrackURL, trackingId) | ||||
| 	ep, err := url.JoinPath(config.TrackURL, publicKey) | ||||
| 	if err != nil { | ||||
| 		return nil, err | ||||
| 	} | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user