Azure-Samples / azure-sdk-for-go-samples

Examples of how to utilize Azure services from Go.
MIT License
296 stars 184 forks source link

Running "go test -v ./storage/" results in an error #275

Open brunoterkaly opened 4 years ago

brunoterkaly commented 4 years ago

Bug Report

Steps to reproduce:

cd ~/go/src/github.com/Azure-Samples/azure-sdk-for-go-samples go test -v ./storage/

Errors and log messages:

=== RUN Example_storageAccountOperations 2020/03/26 17:58:50 creating resource group 'myterratestgroup' on location: westus2 2020/03/26 17:58:53 registered resource provider 2020/03/26 17:58:53 [storage.CheckNameAvailabilityResult]: {Response:{Response:0xc0003902d0} NameAvailable:0xc00039cbd0 Reason:AlreadyExists Message:0xc00037a360} 2020/03/26 17:58:53 checked for account availability 2020/03/26 17:58:53 created storage account 2020/03/26 17:58:53 got storage account details 2020/03/26 17:58:56 updated storage account 2020/03/26 17:58:56 listed storage accounts in resource group 2020/03/26 17:58:56 listed storage accounts in subscription 2020/03/26 17:58:56 get storage account keys 2020/03/26 17:58:57 regenerated first storage account key 2020/03/26 17:58:57 listed usage --- PASS: Example_storageAccountOperations (6.57s) === RUN Example_appendBlobOperations 2020/03/26 17:58:57 -> github.com/Azure/azure-storage-blob-go/azblob.newStorageError, /root/go/pkg/mod/github.com/!azure/azure-storage-blob-go@v0.0.0-20181023070848-cf01652132cc/azblob/zc_storage_error.go:42 ===== RESPONSE ERROR (ServiceCode=AuthenticationFailed) ===== Description=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:a0a0d772-301e-00a8-7998-03353e000000 Time:2020-03-26T17:58:57.6949564Z, Details: AuthenticationErrorDetail: The MAC signature found in the HTTP request 'ace6FuL978Mj6Ljv+tH1egXVxDaTJlfD7NsyCI9XrFw=' is not the same as any computed signature. Server used following string to sign: 'PUT

Expected behavior:

No errors

OS and Go versions:

root-> lsb_release -a

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.4 LTS Release: 16.04 Codename: xenial [~/go/src/github.com/Azure-Samples/azure-sdk-for-go-samples]

root-> go version

go version go1.14.1 linux/amd64 [~/go/src/github.com/Azure-Samples/azure-sdk-for-go-samples]

Further info:

Resources are being provisioned so the .env file is working in terms of authentication.

The golang tests are fairly sophisticated so trying to debug this will take some time for me.