Skip to content

Commit

Permalink
chore(deps): update localstack/localstack docker tag to v2 (#329)
Browse files Browse the repository at this point in the history
* chore(deps): update localstack/localstack docker tag to v2
* Fix AWS_REGION for local test

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Atsushi Watanabe <[email protected]>
  • Loading branch information
renovate[bot] and at-wat authored May 12, 2023
1 parent 6365dfe commit 71649bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
make fixture
make cover # run test with coverage
env:
AWS_REGION: ap-north-east-1 # for awscli
AWS_REGION: ap-northeast-1 # for awscli
- uses: codecov/codecov-action@v3
with:
file: ./cover.out
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

LOCALSTACK_VERSION = 1.4.0
LOCALSTACK_VERSION = 2.0.2

.PHONY: test
test:
Expand Down
10 changes: 6 additions & 4 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -24,9 +24,11 @@ import (
"github.com/aws/aws-sdk-go/service/s3"
)

const awsRegion = "ap-northeast-1"

func getSession() *session.Session {
sess, _ := session.NewSession(&aws.Config{
Region: aws.String("ap-northeast-1"),
Region: aws.String(awsRegion),
S3ForcePathStyle: aws.Bool(true),
Endpoint: aws.String("http://localhost:4572"),
})
Expand All @@ -53,7 +55,7 @@ func (l s3ObjectList) Swap(i, j int) {

func deleteObject(t *testing.T, bucket, key string) {
svc := s3.New(session.New(&aws.Config{
Region: aws.String("test"),
Region: aws.String(awsRegion),
Endpoint: aws.String("http://localhost:4572"),
S3ForcePathStyle: aws.Bool(true),
}))
Expand All @@ -69,7 +71,7 @@ func deleteObject(t *testing.T, bucket, key string) {

func listObjectsSorted(t *testing.T, bucket string) []s3Object {
svc := s3.New(session.New(&aws.Config{
Region: aws.String("test"),
Region: aws.String(awsRegion),
Endpoint: aws.String("http://localhost:4572"),
S3ForcePathStyle: aws.Bool(true),
}))
Expand Down

0 comments on commit 71649bd

Please sign in to comment.