resolved failing tests due to tempData
This commit is contained in:
parent
074345fcf9
commit
0b4bf58107
@ -2119,14 +2119,6 @@ func TestSetVoucher(t *testing.T) {
|
||||
utils.DATA_ACTIVE_ADDRESS: []byte(tempData.ContractAddress),
|
||||
}
|
||||
|
||||
// Define the temporary entries to be cleared
|
||||
tempEntries := map[utils.DataTyp][]byte{
|
||||
utils.DATA_TEMPORARY_SYM: []byte(""),
|
||||
utils.DATA_TEMPORARY_BAL: []byte(""),
|
||||
utils.DATA_TEMPORARY_DECIMAL: []byte(""),
|
||||
utils.DATA_TEMPORARY_ADDRESS: []byte(""),
|
||||
}
|
||||
|
||||
// Mocking ReadEntry calls for temporary data retrieval
|
||||
mockDataStore.On("ReadEntry", ctx, sessionId, utils.DATA_TEMPORARY_SYM).Return([]byte(tempData.TokenSymbol), nil)
|
||||
mockDataStore.On("ReadEntry", ctx, sessionId, utils.DATA_TEMPORARY_BAL).Return([]byte(tempData.Balance), nil)
|
||||
@ -2138,11 +2130,6 @@ func TestSetVoucher(t *testing.T) {
|
||||
mockDataStore.On("WriteEntry", ctx, sessionId, key, value).Return(nil)
|
||||
}
|
||||
|
||||
// Mocking WriteEntry calls for clearing temporary data
|
||||
for key, value := range tempEntries {
|
||||
mockDataStore.On("WriteEntry", ctx, sessionId, key, value).Return(nil)
|
||||
}
|
||||
|
||||
h := &Handlers{
|
||||
userdataStore: mockDataStore,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user