Skip to content

Commit 5dc4057

Browse files
authored
run integration tests in GitHub CI (#2828)
1 parent 0cbb5aa commit 5dc4057

File tree

6 files changed

+61
-2
lines changed

6 files changed

+61
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"id": "7d52e0ac-9c17-4070-8a42-6c1f8a1593ff",
3+
"type": "bugfix",
4+
"collapse": true,
5+
"description": "Fixup some integration tests.",
6+
"modules": [
7+
"feature/s3/manager",
8+
"service/internal/integrationtest"
9+
]
10+
}
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Integration Tests
2+
3+
# these are expensive, limit how often they're running
4+
#
5+
# functionally, all we need to do is vet the code going into main
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
11+
permissions:
12+
id-token: write
13+
14+
# again, expensive, only one per PR can run and they self-cancel
15+
concurrency:
16+
group: ci-codebuild-${{ github.ref }}
17+
cancel-in-progress: true
18+
19+
jobs:
20+
integration-tests:
21+
name: Integration Tests
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Configure AWS credentials
25+
uses: aws-actions/configure-aws-credentials@v4
26+
with:
27+
role-to-assume: ${{ secrets.CI_AWS_ROLE_ARN }}
28+
aws-region: us-west-2
29+
- name: Run tests
30+
id: integration-tests
31+
uses: aws-actions/aws-codebuild-run-build@v1
32+
with:
33+
project-name: aws-sdk-go-v2-integrationtests
34+
- name: Cancel tests
35+
if: ${{ cancelled() }}
36+
env:
37+
BUILD_ID: ${{ steps.integration-tests.outputs.aws-build-id }}
38+
run: |
39+
if [ ! -z "$BUILD_ID" ]; then
40+
echo "aws codebuild stop-build --id $BUILD_ID"
41+
aws codebuild stop-build --id $BUILD_ID
42+
fi
43+

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ ci-lint-install:
410410
#######################
411411
.PHONY: integration integ-modules-% cleanup-integ-buckets
412412

413-
integration: integ-modules-service
413+
integration: integ-modules-service integ-modules-feature
414414

415415
integ-modules-%:
416416
@# integration command that uses the pattern to define the root path that

feature/s3/manager/integ_upload_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func (b *invalidateHash) RegisterMiddleware(stack *middleware.Stack) error {
497497
func (b *invalidateHash) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) (
498498
out middleware.SerializeOutput, metadata middleware.Metadata, err error,
499499
) {
500-
if input, ok := in.Parameters.(*s3.UploadPartInput); ok && input.PartNumber == aws.Int32(2) {
500+
if input, ok := in.Parameters.(*s3.UploadPartInput); ok && aws.ToInt32(input.PartNumber) == 2 {
501501
ctx = v4.SetPayloadHash(ctx, "000")
502502
}
503503

service/internal/integrationtest/health/smoke_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313
)
1414

1515
func TestInteg_00_DescribeEntityAggregates(t *testing.T) {
16+
t.Skip() // requires enterprise support, V1543069783
17+
1618
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
1719
defer cancelFn()
1820

service/internal/integrationtest/support/smoke_test.go

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import (
1717
)
1818

1919
func TestInteg_00_DescribeServices(t *testing.T) {
20+
t.Skip() // requires enterprise support, V1543069783
21+
2022
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
2123
defer cancelFn()
2224

@@ -34,6 +36,8 @@ func TestInteg_00_DescribeServices(t *testing.T) {
3436
}
3537

3638
func TestInteg_01_CreateCase(t *testing.T) {
39+
t.Skip() // requires enterprise support, V1543069783
40+
3741
ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second)
3842
defer cancelFn()
3943

0 commit comments

Comments
 (0)