Skip to content

Commit 3d04e44

Browse files
committed
run chip ingress test in CI, force ipv4
1 parent 8a10e71 commit 3d04e44

File tree

3 files changed

+85
-3
lines changed

3 files changed

+85
-3
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Framework Docker Compose Tests
2+
on:
3+
push:
4+
5+
jobs:
6+
test:
7+
defaults:
8+
run:
9+
working-directory: framework/examples/myproject
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
contents: read
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
test:
18+
- name: TestChipIngressSmoke
19+
config: smoke_chip.toml
20+
count: 1
21+
timeout: 10m
22+
name: ${{ matrix.test.name }}
23+
steps:
24+
- name: Checkout repo
25+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
26+
27+
- name: Configure AWS credentials using OIDC
28+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
29+
with:
30+
role-to-assume: ${{ secrets.AWS_CTF_READ_ACCESS_ROLE_ARN }}
31+
aws-region: us-west-2
32+
33+
- name: Login to Amazon ECR
34+
id: login-ecr-private
35+
uses: aws-actions/amazon-ecr-login@062b18b96a7aff071d4dc91bc00c4c1a7945b076 # v2.0.1
36+
with:
37+
registries: ${{ format('{0},{1}', secrets.AWS_ACCOUNT_ID_SDLC, secrets.AWS_ACCOUNT_ID_PROD) }}
38+
env:
39+
AWS_REGION: us-west-2
40+
41+
- name: Check for changes in Docker Components
42+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
43+
id: changes
44+
with:
45+
filters: |
46+
src:
47+
- 'framework/components/dockercompose/**'
48+
- '.github/workflows/framework-components-tests.yml'
49+
50+
- name: Set up Go
51+
uses: actions/setup-go@v5
52+
with:
53+
go-version: '1.24.0'
54+
55+
- name: Cache Go modules
56+
uses: actions/cache@v4
57+
with:
58+
path: |
59+
~/.cache/go-build
60+
~/go/pkg/mod
61+
key: go-modules-${{ hashFiles('framework/examples/myproject/go.sum') }}-${{ runner.os }}-framework-golden-examples
62+
restore-keys: |
63+
go-modules-${{ runner.os }}-framework-golden-examples
64+
go-modules-${{ runner.os }}
65+
66+
- name: Install dependencies
67+
run: go mod download
68+
69+
- name: Run System Tests
70+
if: steps.changes.outputs.src == 'true'
71+
env:
72+
CTF_CONFIGS: ${{ matrix.test.config }}
73+
run: |
74+
go test -timeout ${{ matrix.test.timeout }} -v -count ${{ matrix.test.count }} -run ${{ matrix.test.name }}
75+
76+
- name: Upload Logs
77+
if: always()
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: container-logs-${{ matrix.test.name }}
81+
path: framework/examples/myproject/logs
82+
retention-days: 1

framework/components/dockercompose/chip_ingress_set/protos.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ func registerSingleProto(
510510
}
511511

512512
url := fmt.Sprintf("%s/subjects/%s/versions", registryURL, subject)
513+
// Force IPv4 to avoid Docker IPv6 port forwarding issues
514+
url = strings.Replace(url, "localhost", "127.0.0.1", 1)
515+
framework.L.Debug().Msgf("Registering schema to URL: %s", url)
513516

514517
resp, respErr := http.Post(url, "application/vnd.schemaregistry.v1+json", bytes.NewReader(payload))
515518
if respErr != nil {

framework/examples/myproject/smoke_chip_ingress_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package examples
22

33
import (
44
"context"
5-
"os"
65
"testing"
76
"time"
87

@@ -17,8 +16,6 @@ type ChipConfig struct {
1716

1817
// use config file: smoke_chip.toml
1918
func TestChipIngressSmoke(t *testing.T) {
20-
t.Skip("skipping smoke test until we have a way to fetch Chip Ingress image")
21-
os.Setenv("CTF_CONFIGS", "smoke_chip.toml")
2219
in, err := framework.Load[ChipConfig](t)
2320
require.NoError(t, err, "failed to load config")
2421

0 commit comments

Comments
 (0)