Skip to content

Commit

Permalink
tewst
Browse files Browse the repository at this point in the history
  • Loading branch information
cpanato committed Apr 2, 2024
1 parent 1c6fe61 commit 9785283
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,41 @@ on:
- main
workflow_dispatch:


jobs:
e2e:
runs-on: ubuntu-latest

permissions:
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2

- name: Setup golang
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
- name: Restore cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: go-${{ hashFiles('**/go.sum') }}
restore-keys: go-
cache: true

- name: Run local registry
run: podman run -d -p 5000:5000 registry:2

- name: Build test image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
id: test-image
with:
base-image: scratch
image: test
oci: true

- name: Push test image to local registry
uses: redhat-actions/push-to-registry@9986a6552bc4571882a4a67e016b17361412b4df # v2.7.1
with:
image: ${{ steps.test-image.outputs.image }}
registry: localhost:5000
tls-verify: false

- name: Run e2e tests
run: go run mage.go E2ETest
8 changes: 7 additions & 1 deletion test/e2e/sign_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ const (

func TestSignImageSuccess(t *testing.T) {
// Test the prerequisites
signer := sign.New(nil)
opts := sign.Default()
opts.IgnoreSCT = true
opts.IgnoreTlog = true
opts.CertIdentityRegexp = "https://github.com/kubernetes-sigs/release-sdk/.github/workflows/e2e.yml@.*"
opts.CertOidcIssuer = "https://token.actions.githubusercontent.com"

signer := sign.New(opts)
signed, err := signer.IsImageSigned(imageRef)
require.Nil(t, err)
require.False(t, signed)
Expand Down

0 comments on commit 9785283

Please sign in to comment.