Skip to content
Snippets Groups Projects
  • Allen Porter's avatar
    351d287d
    Add tests for flux trace command · 351d287d
    Allen Porter authored
    Add tests for flux trace command that fake out the kubernetes client,
    load objects from a yaml file and create them in the client, and
    assert on the output of the trace command to an expected golden file.
    
    This is a follow up from the suggestions in PR https://github.com/fluxcd/flux2/pull/1626
    
     which suggested that additional
    testing would be helpful. This test approach is modeled after the helm command tests.
    
    This required some changes to the kubernetes client setup to make it
    possible to use a fake. If we agree this pattern makes sense, it can be
    applied to other commands.
    
    Signed-off-by: default avatarAllen Porter <allen@thebends.org>
    351d287d
    History
    Add tests for flux trace command
    Allen Porter authored
    Add tests for flux trace command that fake out the kubernetes client,
    load objects from a yaml file and create them in the client, and
    assert on the output of the trace command to an expected golden file.
    
    This is a follow up from the suggestions in PR https://github.com/fluxcd/flux2/pull/1626
    
     which suggested that additional
    testing would be helpful. This test approach is modeled after the helm command tests.
    
    This required some changes to the kubernetes client setup to make it
    possible to use a fake. If we agree this pattern makes sense, it can be
    applied to other commands.
    
    Signed-off-by: default avatarAllen Porter <allen@thebends.org>
This project manages its dependencies using Go Modules. Learn more