File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -154,3 +154,23 @@ func Test_ListPlugins(t *testing.T) {
154154 }, result )
155155 })
156156}
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+ require .ErrorIs (t , err , ErrSecretsEngineNotAvailable )
166+ }
167+
168+ func TestIsDialError (t * testing.T ) {
169+ require .True (t , isDialError (& net.OpError {
170+ Op : "dial" ,
171+ }))
172+ require .True (t , isDialError (& net.OpError {
173+ Op : "connect" ,
174+ }))
175+ require .False (t , isDialError (nil ))
176+ }
You can’t perform that action at this time.
0 commit comments