Skip to content

Assert codes instead of text when using NeoFS CLI tools #919

@cthulhu-rider

Description

@cthulhu-rider

Is your feature request related to a problem? Please describe.

tests dealing with NeoFS via CLI expect particular text sometimes. For example, recently i accidentally changed neofs-cli container get output from container not found to not found, and corresponding test FAIL

this seems good in terms of testing for changes in behavior, and in this particular case. But globally I thought that strict text checking is not always convenient: any improvement of the text makes the test FAIL. For example, if command output will be changed to Container not found - test will FAIL. I wanna two things at the same time:

  1. do not recv FAIL on test if only text output has been changed
  2. still get a behavior change report from the test

Describe the solution you'd like

  1. check resulting codes instead. There are two of them available: NeoFS status and exit code. Checking the NeoFS code would still be a text check, but:
  • rest of the cmd output can be changed freely
  • code correctness is more important than debug message (do we check codes btw? @evgeniiz321)

NeoFS status codes are also mapped into CLI exit ones one way or another. We can develop this behavior reduce text checks even more

  1. report about text change in warning. As i can see, they are available in current toolchain === 95 passed, 1 warning in 2239.92s (0:37:19) ===

Metadata

Metadata

Assignees

No one assigned

    Labels

    I4No visible changesS2Regular significanceU4Nothing urgentblockedCan't be done because of somethingenhancementImproving existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions