MCPcopy
hub / github.com/minio/minio-go / TestChainWithNoProvider

Function TestChainWithNoProvider

pkg/credentials/chain_test.go:113–126  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

111}
112
113func TestChainWithNoProvider(t *testing.T) {
114 p := &Chain{
115 Providers: []Provider{},
116 }
117 if !p.IsExpired() {
118 t.Fatal("Expected to be expired with no providers")
119 }
120 _, err := p.RetrieveWithCredContext(defaultCredContext)
121 if err != nil {
122 if err.Error() != "No valid providers found []" {
123 t.Error(err)
124 }
125 }
126}
127
128func TestChainProviderWithNoValidProvider(t *testing.T) {
129 errs := []error{

Callers

nothing calls this directly

Calls 3

IsExpiredMethod · 0.95
ErrorMethod · 0.45

Tested by

no test coverage detected