Skip to content

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

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.

Activity

  1. added
    tech-debtA chore that addresses technical debt
    and removed on Apr 28, 2025
  2. williammartin commented on Apr 28, 2025

    @williammartin
    Member

    You're right, it was changed here #10334 thanks.

  3. Phuct871 commented on May 9, 2025

    @Phuct871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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