fix: update TestGetActionPinsSorting expected pin count to 38#18438
Merged
pelikhan merged 2 commits intocopilot/add-action-pin-sha-resolutionfrom Feb 26, 2026
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix tests in the project
fix: update TestGetActionPinsSorting expected pin count to 38
Feb 26, 2026
4398aa9
into
copilot/add-action-pin-sha-resolution
1 check passed
Contributor
There was a problem hiding this comment.
Pull request overview
Updates a brittle unit test expectation to match the current number of embedded action pins after adding a new pin for SHA-pinning support.
Changes:
- Adjust
TestGetActionPinsSortingexpected pin count from 37 to 38.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+300
to
+302
| // Verify we got all the pins (38 as of February 2026) | ||
| if len(pins) != 38 { | ||
| t.Errorf("getActionPins() returned %d pins, expected 38", len(pins)) |
There was a problem hiding this comment.
This test hard-codes both the pin count and a date in the comment, which will require churn every time a pin is legitimately added/removed. Since the expected count is already present in the embedded JSON, consider unmarshaling actionPinsJSON in the test and asserting len(getActionPins()) == len(data.Entries) (or dropping the exact-count assertion and just validating non-zero + sorting/fields).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestGetActionPinsSortinghardcoded a pin count of 37, butdata/action_pins.jsonnow has 38 entries after a new pin was added as part of SHA-pinning support foractions/setupin agentics-maintenance generation.Changes
pkg/workflow/action_pins_test.go: Update expected count from 37 → 38 to match the currentdata/action_pins.jsonstate.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw c 9400370/b355=> git _out�� --show-toplevel iptables /usr/bin/git H8z0/I30OLUDwSMTgit security /opt/hostedtoolc--show-toplevel git(http block)/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw git /opt/hostedtoolcache/node/24.13.--show-toplevel node js/f�� /usr/bin/git node /opt/hostedtoolcache/node/24.13.1/x64/bin/node(http block)https://api.github.com/repos/actions/ai-inference/git/ref/tags/v1/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git rev-�� --show-toplevel git 1/x64/bin/bash --show-toplevel /opt/hostedtoolcrev-parse /usr/bin/git infocmp(http block)/usr/bin/gh gh api /repos/actions/ai-inference/git/ref/tags/v1 --jq .object.sha '**/*.ts' '**/*.json' --ignore-path ../../../.pr**/*.json node ache/node/24.13.1/x64/bin/node /usr/bin/git bash /opt/hostedtoolc--show-toplevel git _lab�� .js' --ignore-path .prettierignore node 1/x64/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin/node /usr/bin/git git /snap/bin/bash git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v3/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha --show-toplevel x_amd64/vet /usr/bin/git(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v3 --jq .object.sha install --package-lock-only /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse 1/x64/bin/node git rev-�� --show-toplevel git /usr/bin/git --show-toplevel 64/pkg/tool/linurev-parse 1/x64/bin/node git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha /tmp/go-build3349400370/b075/_pkg_.a -trimpath 9400370/b280/vet.cfg -p testing/internalrev-parse -lang=go1.25 /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -ato�� -bool -buildtags /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet -errorsas -ifaceassert -nilfunc /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/git(http block)https://api.github.com/repos/actions/checkout/git/ref/tags/v5/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha get --local ache/go/1.25.0/x64/pkg/tool/linux_amd64/vet credential.usernbash(http block)/usr/bin/gh gh api /repos/actions/checkout/git/ref/tags/v5 --jq .object.sha -unreachable=false /tmp/go-build3349400370/b084/vet.cfg /opt/hostedtoolcache/go/1.25.0/x64/pkg/tool/linux_amd64/vet(http block)https://api.github.com/repos/actions/github-script/git/ref/tags/v8/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha -unreachable=false /tmp/go-build3349400370/b052/vet.cfg 9400370/b286/vet.cfg(http block)/usr/bin/gh gh api /repos/actions/github-script/git/ref/tags/v8 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/sed(http block)https://api.github.com/repos/actions/setup-go/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel 64/pkg/tool/linux_amd64/vet /usr/bin/tr(http block)/usr/bin/gh gh api /repos/actions/setup-go/git/ref/tags/v4 --jq .object.sha --show-toplevel git 1/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git cjs --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git(http block)https://api.github.com/repos/actions/setup-node/git/ref/tags/v4/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha tags/v5 64/pkg/tool/linux_amd64/vet /usr/bin/git(http block)/usr/bin/gh gh api /repos/actions/setup-node/git/ref/tags/v4 --jq .object.sha --show-toplevel git 1/x64/bin/node --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git cjs --show-toplevel git /usr/bin/git --show-toplevel ache/go/1.25.0/xrev-parse ache/node/24.13.--show-toplevel git(http block)https://api.github.com/repos/github/gh-aw/git/ref/tags/v1.0.0/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel(http block)/usr/bin/gh gh api /repos/github/gh-aw/git/ref/tags/v1.0.0 --jq .object.sha --show-toplevel nly /usr/bin/git --show-toplevel x_amd64/vet /usr/bin/infocmp--noprofile git rev-�� --show-toplevel infocmp /usr/bin/git xterm-color x_amd64/vet /usr/bin/git git(http block)https://api.github.com/repos/nonexistent/action/git/ref/tags/v999.999.999/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha(http block)/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel ZI8EzR7nfQjj /usr/bin/git(http block)/usr/bin/gh gh api /repos/nonexistent/action/git/ref/tags/v999.999.999 --jq .object.sha --show-toplevel nly /usr/bin/git --show-toplevel x_amd64/vet(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.