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

go test list.Blobs undefined

Open
#272 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
309
Forks
187
PR merge metrics
No merged PRs in 30d

Description

Thank you for your contribution and feedback! Help us review faster by providing the following information:

## This issue is a: (mark with an `x`)

- [x] bug report
- [ ] request for new sample
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

## Steps to reproduce:
I cloned the repository and created a .env file:
AZURE_TENANT_ID=cxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6
AZURE_CLIENT_ID=6xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc
AZURE_CLIENT_SECRET=Oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx6
AZURE_SUBSCRIPTION_ID=5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1
AZURE_STORAGE_ACCOUNT_NAME=
AZURE_STORAGE_ACCOUNT_GROUP_NAME=
AZURE_RG_NAME=Pxxxxxxxxxxxl
AZURE_LOCATION=test

## Errors and log messages:
running go test gives me the following error:
# github.com/Azure-Samples/azure-sdk-for-go-samples/storage [github.com/Azure-Samples/azure-sdk-for-go-samples/storage.test]
./container_test.go:44:58: list.Blobs undefined (type *azblob.ListBlobsFlatSegmentResponse has no field or method Blobs)
FAIL github.com/Azure-Samples/azure-sdk-for-go-samples/storage [build failed]

## Expected behavior:
maybe the test should fail but the build should pass.

## OS and Go versions:
Ubuntu 19.10
go 1.1.2.17

## Further info:

Contributor guide

Open the contributing guide

Research direction

Run go test in the storage package and inspect container_test.go around line 44, where ListBlobsFlatSegmentResponse.Blobs is referenced. Compare that usage with the available Azure SDK response type and confirm the package builds successfully; the issue is done when go test no longer fails at compilation.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, go
Domain
cloud
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.