diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3e1cb9..43dad60 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,8 +9,22 @@ on: jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.25' + + - name: Run tests + run: make tests-with-docker + build: runs-on: ubuntu-latest + needs: test steps: - uses: actions/checkout@v4 @@ -18,7 +32,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: '1.25' - + - name: Build env: RELEASE_BUILD_LINKER_FLAGS: "-s -w" diff --git a/.github/workflows/integ-tests.yml b/.github/workflows/integ-tests.yml index 1205a3e..1ac0a78 100644 --- a/.github/workflows/integ-tests.yml +++ b/.github/workflows/integ-tests.yml @@ -1,10 +1,10 @@ name: Run Integration Tests -on: - pull_request: - branches: - - develop - +# on: +# pull_request: +# branches: +# - develop +# jobs: go-tests: runs-on: ubuntu-latest @@ -46,4 +46,4 @@ jobs: with: python-version: '3.14' - name: run integration tests - run: make integ-tests-with-docker-old \ No newline at end of file + run: make integ-tests-with-docker-old diff --git a/lambda/core/directinvoke/directinvoke_test.go b/lambda/core/directinvoke/directinvoke_test.go index 94b6323..4682270 100644 --- a/lambda/core/directinvoke/directinvoke_test.go +++ b/lambda/core/directinvoke/directinvoke_test.go @@ -119,7 +119,7 @@ func TestAsyncPayloadCopyWhenPayloadSizeBelowMaxAllowed(t *testing.T) { require.Equal(t, EndOfResponseComplete, writer.Header().Get(EndOfResponseTrailer)) // reset it to its original value - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } func TestAsyncPayloadCopyWhenPayloadSizeEqualMaxAllowed(t *testing.T) { @@ -138,7 +138,7 @@ func TestAsyncPayloadCopyWhenPayloadSizeEqualMaxAllowed(t *testing.T) { require.Equal(t, EndOfResponseComplete, writer.Header().Get(EndOfResponseTrailer)) // reset it to its original value - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } func TestAsyncPayloadCopyWhenPayloadSizeAboveMaxAllowed(t *testing.T) { @@ -163,7 +163,7 @@ func TestAsyncPayloadCopyWhenPayloadSizeAboveMaxAllowed(t *testing.T) { require.Equal(t, EndOfResponseOversized, writer.Header().Get(EndOfResponseTrailer)) // reset it to its original value - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } // This is only allowed in streaming mode, currently. @@ -183,7 +183,7 @@ func TestAsyncPayloadCopyWhenUnlimitedPayloadSizeAllowed(t *testing.T) { require.Equal(t, EndOfResponseComplete, writer.Header().Get(EndOfResponseTrailer)) // reset it to its original value - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } // We use an interruptable response writer which informs on a channel that it's ready to be interrupted after @@ -275,7 +275,7 @@ func TestSendPayloadLimitedResponseWithinThresholdWithStreamingFunction(t *testi <-testFinished // Reset to its default value, just in case other tests use them - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } func TestSendPayloadLimitedResponseAboveThresholdWithStreamingFunction(t *testing.T) { @@ -310,7 +310,7 @@ func TestSendPayloadLimitedResponseAboveThresholdWithStreamingFunction(t *testin <-testFinished // Reset to its default value, just in case other tests use them - MaxDirectResponseSize = interop.MaxPayloadSize + MaxDirectResponseSize = int64(interop.MaxPayloadSize) } func TestSendStreamingInvokeResponseSuccessWithTrailers(t *testing.T) { diff --git a/lambda/interop/model.go b/lambda/interop/model.go index ee7bb2a..2991d8e 100644 --- a/lambda/interop/model.go +++ b/lambda/interop/model.go @@ -356,7 +356,7 @@ type ErrorResponseTooLargeDI struct { // ErrorResponseTooLarge is returned when response provided by Runtime does not fit into shared memory buffer func (s *ErrorResponseTooLarge) Error() string { - return fmt.Sprintf("Response payload size exceeded maximum allowed payload size (%d bytes).", s.MaxResponseSize) + return fmt.Sprintf("Response payload size (%d bytes) exceeded maximum allowed payload size (%d bytes).", s.ResponseSize, s.MaxResponseSize) } // AsErrorResponse generates ErrorInvokeResponse from ErrorResponseTooLarge