diff --git a/.github/workflows/fixtures.yml b/.github/workflows/fixtures.yml index efcc5144..cc5fbfbd 100644 --- a/.github/workflows/fixtures.yml +++ b/.github/workflows/fixtures.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 with: - token: ${{ secrets.RYAN_FIXTURE_GEN_PAT }} + token: ${{ secrets.TESTER_FIXTURE_GENERATION_GITHUB_TOKEN }} - name: Set up Go uses: actions/setup-go@v1 @@ -43,7 +43,7 @@ jobs: run: | git config --global user.email "ryan-gg@outlook.com" git config --global user.name "Ryan Gang" - git remote set-url origin https://ryan-gang:${{ secrets.RYAN_FIXTURE_GEN_PAT }}@github.com/codecrafters-io/shell-tester.git + git remote set-url origin https://ryan-gang:${{ secrets.TESTER_FIXTURE_GENERATION_GITHUB_TOKEN }}@github.com/codecrafters-io/shell-tester.git git fetch origin ${{ github.head_ref }} git checkout ${{ github.head_ref }} git diff --quiet || (git add . && git commit -m "ci: add regenerated fixtures" && git push) diff --git a/internal/stage2.go b/internal/stage2.go index 9defb24c..7153710f 100644 --- a/internal/stage2.go +++ b/internal/stage2.go @@ -17,7 +17,7 @@ func testInvalidCommand(stageHarness *test_case_harness.TestCaseHarness) error { } testCase := test_cases.InvalidCommandTestCase{ - Command: getRandomInvalidCommand(), + Command: "invalid", } if err := testCase.RunWithoutNextPromptAssertion(asserter, shell, logger); err != nil { return err diff --git a/internal/test_helpers/fixtures/base/pass b/internal/test_helpers/fixtures/base/pass index a3227cd3..6a86eda5 100644 --- a/internal/test_helpers/fixtures/base/pass +++ b/internal/test_helpers/fixtures/base/pass @@ -98,8 +98,8 @@ Debug = true [stage-2] Running tests for Stage #2: cz2 [stage-2] Running ./your_shell.sh -[your-program] $ invalid_blueberry_command -[your-program] bash: invalid_blueberry_command: command not found +[your-program] $ invalid +[your-program] bash: invalid: command not found [stage-2] ✓ Received command not found message [your-program] $ [stage-2] Test passed. diff --git a/internal/test_helpers/fixtures/escape_codes b/internal/test_helpers/fixtures/escape_codes index 6dee714b..91842509 100644 --- a/internal/test_helpers/fixtures/escape_codes +++ b/internal/test_helpers/fixtures/escape_codes @@ -2,8 +2,8 @@ Debug = true [stage-2] Running tests for Stage #2: cz2 [stage-2] Running ./your_shell.sh -[your-program] $ invalid_pear_command -[your-program] invalid_pear_command: command not found +[your-program] $ invalid +[your-program] invalid: command not found [stage-2] ✓ Received command not found message [your-program] $ [stage-2] Test passed. diff --git a/internal/test_helpers/fixtures/navigation/pass b/internal/test_helpers/fixtures/navigation/pass index ac978841..8f69b69e 100644 --- a/internal/test_helpers/fixtures/navigation/pass +++ b/internal/test_helpers/fixtures/navigation/pass @@ -48,7 +48,7 @@ Debug = true [your-program] pwd is a shell builtin [stage-9] ✓ Received expected response [your-program] $ pwd -[your-program] /workspaces/shell-tester/internal +[your-program] /home/runner/work/shell-tester/shell-tester/internal [stage-9] ✓ Received current working directory response [your-program] $ [stage-9] Test passed. @@ -148,8 +148,8 @@ Debug = true [stage-2] Running tests for Stage #2: cz2 [stage-2] Running ./your_shell.sh -[your-program] $ invalid_strawberry_command -[your-program] bash: invalid_strawberry_command: command not found +[your-program] $ invalid +[your-program] bash: invalid: command not found [stage-2] ✓ Received command not found message [your-program] $ [stage-2] Test passed. diff --git a/internal/test_helpers/fixtures/no_output b/internal/test_helpers/fixtures/no_output index cecfa7ba..51383fe0 100644 --- a/internal/test_helpers/fixtures/no_output +++ b/internal/test_helpers/fixtures/no_output @@ -2,9 +2,9 @@ Debug = true [stage-2] Running tests for Stage #2: cz2 [stage-2] Running ./your_shell.sh -[your-program] $ invalid_pear_command +[your-program] $ invalid [stage-2] Output does not match expected value. -[stage-2] Expected: "invalid_pear_command: command not found" +[stage-2] Expected: "invalid: command not found" [stage-2] Received: "" [stage-2] Assertion failed. [stage-2] Test failed diff --git a/internal/test_helpers/fixtures/wrong_output b/internal/test_helpers/fixtures/wrong_output index 63dd8389..323028fd 100644 --- a/internal/test_helpers/fixtures/wrong_output +++ b/internal/test_helpers/fixtures/wrong_output @@ -2,10 +2,10 @@ Debug = true [stage-2] Running tests for Stage #2: cz2 [stage-2] Running ./your_shell.sh -[your-program] $ invalid_pear_command -[your-program] Command: invalid_pear_command +[your-program] $ invalid +[your-program] Command: invalid [stage-2] Output does not match expected value. -[stage-2] Expected: "invalid_pear_command: command not found" -[stage-2] Received: "Command: invalid_pear_command" +[stage-2] Expected: "invalid: command not found" +[stage-2] Received: "Command: invalid" [stage-2] Assertion failed. [stage-2] Test failed