Skip to content

Commit

Permalink
Avoid making an API call in test
Browse files Browse the repository at this point in the history
This call fails since we are explicitly using an invalid token.
  • Loading branch information
aeisenberg committed Aug 30, 2022
1 parent 6eadf13 commit 01c45bf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/__init-with-registries.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions pr-checks/checks/init-with-registries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,22 @@ name: "Packaging: Download using registries"
description: "Checks that specifying a registries block and associated auth works as expected"
versions: ["latest", "cached", "nightly-latest"] # This feature is not compatible with old CLIs

permissions:
# ensure the default token cannot be used to download packs
actions: read
packages: none

steps:
- name: Init with registries-auth-tokens
uses: ./../action/init
with:
db-location: "${{ runner.temp }}/customDbLocation"
tools: ${{ steps.prepare-test.outputs.tools-url }}
config-file: ./.github/codeql/codeql-config-query-filters1.yml
config-file: ./.github/codeql/codeql-config-registries.yml
languages: javascript
registries-auth-tokens: https://ghcr.io/v2=${{ secrets.GITHUB_TOKEN }}
# ensure test will fail if registries block is not used
token: i-am-not-a-token
env:
TEST_MODE: true
# ensure test will fail if registries block is not used
GITHUB_TOKEN: i-am-not-a-token
- name: Verify packages installed
run: |
PRIVATE_PACK="$HOME/.codeql/packages/dsp-testing/private-pack"
Expand Down

0 comments on commit 01c45bf

Please sign in to comment.