We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 43c1c5f commit 4b1860bCopy full SHA for 4b1860b
1 file changed
client/client_test.go
@@ -154,3 +154,23 @@ func Test_ListPlugins(t *testing.T) {
154
}, result)
155
})
156
}
157
+
158
+func TestSecretsEngineUnavailable(t *testing.T) {
159
+ socketPath := testhelper.RandomShortSocketName()
160
+ client, err := New(WithSocketPath(socketPath))
161
+ require.NoError(t, err)
162
+ _, err = client.ListPlugins(t.Context())
163
+ require.ErrorIs(t, err, ErrSecretsEngineNotAvailable)
164
+ _, err = client.GetSecrets(t.Context(), secrets.MustParsePattern("**"))
165
166
+}
167
168
+func TestIsDialError(t *testing.T) {
169
+ require.True(t, isDialError(&net.OpError{
170
+ Op: "dial",
171
+ }))
172
173
+ Op: "connect",
174
175
+ require.False(t, isDialError(nil))
176
0 commit comments