diff --git a/composition/file_content_loader.go b/composition/file_content_loader.go index 948a4ef..6751ca7 100644 --- a/composition/file_content_loader.go +++ b/composition/file_content_loader.go @@ -9,7 +9,7 @@ import ( "time" ) -var RequestProcessorsNotApplicable = errors.New("request processors are not apliable on file content") +var ResponseProcessorsNotApplicable = errors.New("request processors are not apliable on file content") type FileContentLoader struct { parser ContentParser @@ -23,7 +23,7 @@ func NewFileContentLoader() *FileContentLoader { func (loader *FileContentLoader) Load(fd *FetchDefinition) (Content, error) { if fd.RespProc != nil { - return nil, RequestProcessorsNotApplicable + return nil, ResponseProcessorsNotApplicable } filename := strings.TrimPrefix(fd.URL, FileURLPrefix) f, err := os.Open(filename) diff --git a/composition/file_content_loader_test.go b/composition/file_content_loader_test.go index ea63652..67c7824 100644 --- a/composition/file_content_loader_test.go +++ b/composition/file_content_loader_test.go @@ -67,7 +67,7 @@ func Test_FileContentLoader_RequestProcessor(t *testing.T) { fd.RespProc = NewMockResponseProcessor(ctrl) _, err := NewFileContentLoader().Load(fd) - a.Equal(RequestProcessorsNotApplicable, err) + a.Equal(ResponseProcessorsNotApplicable, err) } const letterBytes = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"