FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix tests and run tests on ci by carole-lavillonniere · Pull Request #61 · localstack/lambda-runtime-init · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .go  (2) .yml  (2) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,30 @@ 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

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.25'

- name: Build
env:
RELEASE_BUILD_LINKER_FLAGS: "-s -w"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/integ-tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -46,4 +46,4 @@ jobs:
with:
python-version: '3.14'
- name: run integration tests
run: make integ-tests-with-docker-old
run: make integ-tests-with-docker-old
12 changes: 6 additions & 6 deletions lambda/core/directinvoke/directinvoke_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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) {
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lambda/interop/model.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

Back | FazBrowse Home | New Git URL