Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@andyfeller
Copy link
Member

This PR follows on #9782 due to similarities and relying upon the same custom commands and expands upon the GitHub CLI acceptance tests to cover gh variable commands for 1) repository, 2) repository environment, and 3) organization.

set -o pipefail && GH_ACCEPTANCE_TOKEN=$(gh auth token) GH_ACCEPTANCE_HOST=github.com GH_ACCEPTANCE_ORG=tinyfists go test -tags acceptance -json -run ^TestVariables$ github.com/cli/cli/v2/acceptance  | tparse --all go test

resulting in:

┌─────────────────────────────────────────────────────────────────────────────────────────┐
│  STATUS │ ELAPSED │              TEST               │             PACKAGE               │
│─────────┼─────────┼─────────────────────────────────┼───────────────────────────────────│
│  PASS   │    5.30 │ TestVariables/variable-repo-env │ github.com/cli/cli/v2/acceptance  │
│  PASS   │    4.72 │ TestVariables/variable-repo     │ github.com/cli/cli/v2/acceptance  │
│  PASS   │    1.89 │ TestVariables/variable-org      │ github.com/cli/cli/v2/acceptance  │
│  PASS   │    0.00 │ TestVariables                   │ github.com/cli/cli/v2/acceptance  │
└─────────────────────────────────────────────────────────────────────────────────────────┘
┌────────────────────────────────────────────────────────────────────────────────────┐
│  STATUS │ ELAPSED │             PACKAGE              │ COVER │ PASS │ FAIL │ SKIP  │
│─────────┼─────────┼──────────────────────────────────┼───────┼──────┼──────┼───────│
│  PASS   │  5.84s  │ github.com/cli/cli/v2/acceptance │  --   │  4   │  0   │  0    │
└────────────────────────────────────────────────────────────────────────────────────┘

@andyfeller andyfeller requested a review from a team as a code owner October 17, 2024 20:10
@andyfeller andyfeller requested review from BagToad and removed request for a team October 17, 2024 20:10
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Oct 17, 2024
@andyfeller andyfeller changed the title Andyfeller/testscripts variable Add acceptance tests for variable commands Oct 17, 2024
Base automatically changed from andyfeller/testscripts-secret to trunk October 21, 2024 19:33
@andyfeller andyfeller closed this Oct 21, 2024
This commit refactors a bit of the variable testscripts given the changes in the secret testscripts efforts, removing potentially unnecessary assertions and making these look more similar to other testscripts.
@andyfeller andyfeller reopened this Oct 21, 2024
Copy link
Member

@williammartin williammartin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good to me. Again, I understand that repo-env might be conditionalised at some point in the future. The failure was clear to me because of the section comment 👌

@andyfeller andyfeller merged commit 34f1b50 into trunk Oct 22, 2024
@andyfeller andyfeller deleted the andyfeller/testscripts-variable branch October 22, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants