We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 506d40f commit e6d8c11Copy full SHA for e6d8c11
internal/cli/streams/privatelink/delete_test.go
@@ -72,4 +72,26 @@ func TestDeleteOpts_Run(t *testing.T) {
72
73
require.NoError(t, err)
74
})
75
+
76
+ t.Run("should not call delete if confirm is false", func(t *testing.T) {
77
+ ctrl := gomock.NewController(t)
78
+ mockStore := mocks.NewMockPrivateLinkDeleter(ctrl)
79
80
+ deleteOpts := &DeleteOpts{
81
+ DeleteOpts: &cli.DeleteOpts{
82
+ Entry: "another-connection-id",
83
+ Confirm: false,
84
+ },
85
+ store: mockStore,
86
+ }
87
88
+ mockStore.
89
+ EXPECT().
90
+ DeletePrivateLinkEndpoint(gomock.Any(), gomock.Any()).
91
+ Times(0)
92
93
+ err := deleteOpts.Run()
94
95
+ require.NoError(t, err)
96
+ })
97
}
0 commit comments