Skip to content

Commit e992b22

Browse files
committed
Merge branch 'sdcard'
2 parents a9a0733 + 88d7635 commit e992b22

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

api/firmware/sdcard.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ func (device *Device) CheckSDCard() (bool, error) {
3737
return sdCardInserted.CheckSdcard.Inserted, nil
3838
}
3939

40-
// InsertRemoveSDCard sends a command to the device to insert of remove the sd card based on the workflow state.
41-
func (device *Device) InsertRemoveSDCard(action messages.InsertRemoveSDCardRequest_SDCardAction) error {
40+
// InsertSDCard sends a command to the device to prompt to insert the sd card.
41+
func (device *Device) InsertSDCard() error {
4242
request := &messages.Request{
4343
Request: &messages.Request_InsertRemoveSdcard{
4444
InsertRemoveSdcard: &messages.InsertRemoveSDCardRequest{
45-
Action: action,
45+
Action: messages.InsertRemoveSDCardRequest_INSERT_CARD,
4646
},
4747
},
4848
}

api/firmware/sdcard_test.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package firmware
1717
import (
1818
"testing"
1919

20-
"github.com/BitBoxSwiss/bitbox02-api-go/api/firmware/messages"
2120
"github.com/stretchr/testify/require"
2221
)
2322

@@ -31,12 +30,9 @@ func TestSimulatorCheckSDCard(t *testing.T) {
3130
})
3231
}
3332

34-
func TestSimutorInsertRemoveSDCard(t *testing.T) {
33+
func TestSimutorInsertSDCard(t *testing.T) {
3534
testSimulatorsAfterPairing(t, func(t *testing.T, device *Device) {
3635
t.Helper()
37-
require.NoError(t,
38-
device.InsertRemoveSDCard(messages.InsertRemoveSDCardRequest_INSERT_CARD))
39-
require.NoError(t,
40-
device.InsertRemoveSDCard(messages.InsertRemoveSDCardRequest_REMOVE_CARD))
36+
require.NoError(t, device.InsertSDCard())
4137
})
4238
}

0 commit comments

Comments
 (0)