Skip to content

Expected error message in TestRepo/repo-set-default acceptance test is out of date #10883

@aconsuegra

Description

@aconsuegra

While running acceptance tests, I found that one test is failing because the error message we expect (and validate) is different than the error message we are receiving.

While running TestRepo/repo-set-default, we do:

# Ensure that no default is set
cd $SCRIPT_NAME-$RANDOM_STRING
exec gh repo set-default --view
stderr 'no default repository has been set; use `gh repo set-default` to select one'

But the output while running the test is:

# Ensure that no default is set (2.091s)
> cd $SCRIPT_NAME-$RANDOM_STRING
$WORK/repo_set_default-oaJIlaRWss
> exec gh repo set-default --view
[stderr]
X No default remote repository has been set. To learn more about the default repository, run: gh repo set-default --help
> stderr 'no default repository has been set; use `gh repo set-default` to select one'
FAIL: testdata/repo/repo-set-default.txtar:10: no match for "no default repository has been set; use `gh repo set-default` to select one" found in stderr

If I change the test to do:

# Ensure that no default is set
cd $SCRIPT_NAME-$RANDOM_STRING
exec gh repo set-default --view
stderr 'No default remote repository has been set. To learn more about the default repository, run: gh repo set-default --help'

then the test passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtA chore that addresses technical debt

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions