Skip to content

Commit bb2348a

Browse files
committed
fix tools tests
1 parent 4ca0c0c commit bb2348a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,16 @@ jobs:
4848
regex: ./...
4949
steps:
5050
- uses: actions/checkout@v3
51+
- name: Configure AWS credentials using OIDC
52+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
53+
with:
54+
role-to-assume: ${{ secrets.PUBLIC_AWS_ECR_ROLE }}
55+
aws-region: us-east-1
56+
- name: Authenticate to ECR Public
57+
id: login-ecr-public
58+
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
59+
with:
60+
registry-type: public
5161
- name: Set up Go
5262
uses: actions/setup-go@v5
5363
with:

tools/ghlatestreleasechecker/main_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestMainFunction(t *testing.T) {
3737
defer func() { repoURL = oldRepoURL }()
3838

3939
os.Args = []string{"main", "some/repo", "30"}
40-
require.PanicsWithError(t, "error fetching release: unexpected status code: 404\n", func() {
40+
require.PanicsWithError(t, "error fetching release: unexpected status code: 404", func() {
4141
main()
4242
})
4343
})
@@ -61,7 +61,7 @@ func TestMainFunction(t *testing.T) {
6161
output := captureOutput(func() {
6262
main()
6363
})
64-
require.Contains(t, "v1.0.0", output)
64+
require.Contains(t, "v1.0.0\n", output)
6565
})
6666

6767
t.Run("ValidArgumentsWithOldRelease", func(t *testing.T) {

0 commit comments

Comments
 (0)