Fix linting issues
This commit is contained in:
parent
a09c7ade7b
commit
54e2c1e01a
|
@ -229,7 +229,7 @@ func (r *StateStore) writeFile(req *state.SetRequest) error {
|
|||
blobURL := r.containerURL.NewBlockBlobURL(getFileName(req.Key))
|
||||
|
||||
// this is for backward compatibility where it might have come from http request
|
||||
blobHTTPHeaders, err := createBlobHttpHeadersFromRequest(req)
|
||||
blobHTTPHeaders, err := createBlobHTTPHeadersFromRequest(req)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -253,7 +253,7 @@ func (r *StateStore) writeFile(req *state.SetRequest) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func createBlobHttpHeadersFromRequest(req *state.SetRequest) (azblob.BlobHTTPHeaders, error) {
|
||||
func createBlobHTTPHeadersFromRequest(req *state.SetRequest) (azblob.BlobHTTPHeaders, error) {
|
||||
var blobHTTPHeaders azblob.BlobHTTPHeaders
|
||||
|
||||
if req.ContentType != "" {
|
||||
|
|
|
@ -72,14 +72,14 @@ func TestFileName(t *testing.T) {
|
|||
})
|
||||
}
|
||||
|
||||
func TestBlobHttpHeaderGeneration(t *testing.T) {
|
||||
func TestBlobHTTPHeaderGeneration(t *testing.T) {
|
||||
|
||||
t.Run("Content type is set from request", func(t *testing.T) {
|
||||
req := &state.SetRequest{
|
||||
ContentType: "application/json",
|
||||
}
|
||||
|
||||
blobHeaders, err := createBlobHttpHeadersFromRequest(req)
|
||||
blobHeaders, err := createBlobHTTPHeadersFromRequest(req)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, "application/json", blobHeaders.ContentType)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue