Skip to content

Replace shared variables for test http server with structure fields #32

@gboyvalenkov-bosch

Description

@gboyvalenkov-bosch

Currently there are 3 shared variables in http_test_utl.go: failCountBadStatus, failCopyError, corruptFileError. They should be replaced with fields within TestHTTPServer structure, in order to make code more readable and understandable. However this requires revision of http handler functions. Currently only 1 test alias is used for all methods, which implies that handler function is registered only once.
Since this function is a pointer receiver of TestHTTPServer, it uses the fields from the first created instance, which makes it impossible to modify behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskSingle unit of work

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions