Skip to content

Commit 2cb46c8

Browse files
committed
testing do not merge
Signed-off-by: Arjun Raja Yogidas <arjunry@amazon.com>
1 parent 819a0ff commit 2cb46c8

File tree

2 files changed

+33
-29
lines changed

2 files changed

+33
-29
lines changed

.github/workflows/build.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,25 @@ jobs:
2828
setup:
2929
uses: ./.github/workflows/setup.yml
3030

31-
test:
32-
needs: setup
33-
runs-on: ${{ fromJSON(needs.setup.outputs.runner-labels)[matrix.os] }}
34-
strategy:
35-
matrix:
36-
os: ${{ fromJSON(needs.setup.outputs.available-runners) }}
37-
timeout-minutes: 15
38-
steps:
39-
- uses: actions/checkout@v6
40-
- uses: actions/setup-go@v6
41-
with:
42-
go-version: ${{ env.GO_VERSION }}
43-
- name: Install zlib static on AL2 ARM instances
44-
if: matrix.os == 'al2-arm'
45-
run: dnf install zlib-static.aarch64 -y
46-
- run: make
47-
- run: make test-with-coverage
48-
- name: Show test coverage
49-
run: make show-test-coverage
31+
# test:
32+
# needs: setup
33+
# runs-on: ${{ fromJSON(needs.setup.outputs.runner-labels)[matrix.os] }}
34+
# strategy:
35+
# matrix:
36+
# os: ${{ fromJSON(needs.setup.outputs.available-runners) }}
37+
# timeout-minutes: 15
38+
# steps:
39+
# - uses: actions/checkout@v6
40+
# - uses: actions/setup-go@v6
41+
# with:
42+
# go-version: ${{ env.GO_VERSION }}
43+
# - name: Install zlib static on AL2 ARM instances
44+
# if: matrix.os == 'al2-arm'
45+
# run: dnf install zlib-static.aarch64 -y
46+
# - run: make
47+
# - run: make test-with-coverage
48+
# - name: Show test coverage
49+
# run: make show-test-coverage
5050

5151
integration:
5252
needs: setup
@@ -72,6 +72,6 @@ jobs:
7272
if [[ "${{ matrix.os }}" == "ubuntu-x86" ]]; then
7373
SKIP_SYSTEMD_TESTS=1
7474
fi
75-
SKIP_SYSTEMD_TESTS=$SKIP_SYSTEMD_TESTS make integration-with-coverage
76-
- name: Show test coverage
77-
run: make show-integration-coverage
75+
SKIP_SYSTEMD_TESTS=$SKIP_SYSTEMD_TESTS GO_TEST_FLAGS="-run TestConvert/convert_and_replace" make integration
76+
# - name: Show test coverage
77+
# run: make show-integration-coverage

integration/convert_test.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,24 +200,28 @@ func validateConversion(t *testing.T, sh *shell.Shell, originalDigest, converted
200200

201201
// Get GC labels
202202
manifestLabelOutput := sh.O("ctr", "content", "label", manifestDesc.Digest.String())
203+
fmt.Printf("running ctr content label on manifest digest -> %v", manifestDesc.Digest.String())
203204
manifestLabels := strings.Split(strings.TrimSpace(string(manifestLabelOutput)), ",")
205+
fmt.Printf("length of maifestLabels -> %v", len(manifestLabels))
204206
// verify GC lables exists
205207
if len(manifestLabels) <= 0 {
206208
t.Errorf("manifest does not contain labels, got %d labels", len(manifestLabels))
207209
}
208210
// verify config label exists
209-
// verify config label exists
210-
hasConfigLabel := false
211+
var configInfor ocispec.Descriptor
211212
for _, label := range manifestLabels {
212213
parts := strings.Split(label, "=")
213214
if len(parts) == 2 && parts[0] == "containerd.io/gc.ref.content.config" {
214-
hasConfigLabel = true
215-
break
215+
fmt.Printf("If it goes here it should be failing -> %v", parts[1])
216+
configBytes := sh.O("ctr", "content", "label", parts[1])
217+
if err := json.Unmarshal(configBytes, &configInfor); err != nil {
218+
t.Errorf("failed to decode manifest: %v", err)
219+
continue
220+
}
221+
216222
}
217223
}
218-
if !hasConfigLabel {
219-
t.Errorf("manifest does not contain required config label 'containerd.io/gc.ref.content.config'")
220-
}
224+
221225
}
222226

223227
}

0 commit comments

Comments
 (0)