From 93d9bfb682e0ef3a8bce5c769d7c9df75894ae82 Mon Sep 17 00:00:00 2001 From: Nikola Divic Date: Sun, 13 Feb 2022 18:39:37 +0100 Subject: [PATCH] doc: stm test annotations for cli/sync category --- cli/sync_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cli/sync_test.go b/cli/sync_test.go index 174279d0820..90f20a029e0 100644 --- a/cli/sync_test.go +++ b/cli/sync_test.go @@ -43,6 +43,7 @@ func TestSyncStatus(t *testing.T) { mockApi.EXPECT().SyncState(ctx).Return(state, nil) + //stm: @CLI_SYNC_STATUS_001 err := app.Run([]string{"sync", "status"}) assert.NoError(t, err) @@ -68,6 +69,7 @@ func TestSyncMarkBad(t *testing.T) { mockApi.EXPECT().SyncMarkBad(ctx, blk.Cid()).Return(nil) + //stm: @CLI_SYNC_MARK_BAD_001 err := app.Run([]string{"sync", "mark-bad", blk.Cid().String()}) assert.NoError(t, err) } @@ -84,6 +86,7 @@ func TestSyncUnmarkBad(t *testing.T) { mockApi.EXPECT().SyncUnmarkBad(ctx, blk.Cid()).Return(nil) + //stm: @CLI_SYNC_UNMARK_BAD_001 err := app.Run([]string{"sync", "unmark-bad", blk.Cid().String()}) assert.NoError(t, err) }) @@ -97,6 +100,7 @@ func TestSyncUnmarkBad(t *testing.T) { mockApi.EXPECT().SyncUnmarkAllBad(ctx).Return(nil) + //stm: @CLI_SYNC_UNMARK_BAD_002 err := app.Run([]string{"sync", "unmark-bad", "-all"}) assert.NoError(t, err) }) @@ -114,6 +118,7 @@ func TestSyncCheckBad(t *testing.T) { mockApi.EXPECT().SyncCheckBad(ctx, blk.Cid()).Return("", nil) + //stm: @CLI_SYNC_CHECK_BAD_002 err := app.Run([]string{"sync", "check-bad", blk.Cid().String()}) assert.NoError(t, err) @@ -132,6 +137,7 @@ func TestSyncCheckBad(t *testing.T) { mockApi.EXPECT().SyncCheckBad(ctx, blk.Cid()).Return(reason, nil) + //stm: @CLI_SYNC_CHECK_BAD_001 err := app.Run([]string{"sync", "check-bad", blk.Cid().String()}) assert.NoError(t, err) @@ -155,6 +161,7 @@ func TestSyncCheckpoint(t *testing.T) { mockApi.EXPECT().SyncCheckpoint(ctx, ts.Key()).Return(nil), ) + //stm: @CLI_SYNC_CHECKPOINT_001 err := app.Run([]string{"sync", "checkpoint", blk.Cid().String()}) assert.NoError(t, err) }) @@ -175,6 +182,7 @@ func TestSyncCheckpoint(t *testing.T) { mockApi.EXPECT().SyncCheckpoint(ctx, ts.Key()).Return(nil), ) + //stm: @CLI_SYNC_CHECKPOINT_002 err := app.Run([]string{"sync", "checkpoint", fmt.Sprintf("-epoch=%d", epoch)}) assert.NoError(t, err) })