assert.EqualError(t,err,"Could not instantiate Azure blockBlobClient from Azure Container Client: error containerClient")
})
t.Run("error credentials",func(t*testing.T){
t.Parallel()
// initialization
config:=azureBlobUploadOptions{
JSONCredentialsAzure:`{
"account_name":"name",
"container_name":"container"
}`,
FilePath:"nonExistingFilepath",
}
// test
_,err:=setup(&config)
// assert
assert.EqualError(t,err,"Azure credentials are not valid: Key: 'azureCredentials.SASToken' Error:Field validation for 'SASToken' failed on the 'required' tag")
})
t.Run("error JSONStruct",func(t*testing.T){
t.Parallel()
// initialization
config:=azureBlobUploadOptions{
JSONCredentialsAzure:`faulty json`,
}
// test
_,err:=setup(&config)
// assert
assert.EqualError(t,err,"Could not read JSONCredentialsAzure: invalid character 'u' in literal false (expecting 'l')")