Skip to content

Commit

Permalink
Merge pull request #171 from awa/go
Browse files Browse the repository at this point in the history
Supported Go versions 1.18 or later
  • Loading branch information
takecy authored Oct 18, 2022
2 parents 9e5ea1f + eb2203f commit 32ff8d7
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: [ '1.15', '1.16', '1.17' ]
go: [ '1.18', '1.19' ]
name: Go ${{ matrix.go }} test
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
go-iap
======

![](https://img.shields.io/badge/golang-1.15+-blue.svg?style=flat)
![](https://img.shields.io/badge/golang-1.18+-blue.svg?style=flat)
[![Build Status](https://travis-ci.org/awa/go-iap.svg?branch=master)](https://travis-ci.org/awa/go-iap)
[![codecov.io](https://codecov.io/github/awa/go-iap/coverage.svg?branch=master)](https://codecov.io/github/awa/go-iap?branch=master)

Expand Down
16 changes: 5 additions & 11 deletions amazon/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"fmt"
"net/http"
"net/http/httptest"
"net/url"
"os"
"reflect"
"testing"
Expand Down Expand Up @@ -169,21 +168,16 @@ func TestVerifyEntitled(t *testing.T) {

func TestVerifyTimeout(t *testing.T) {
t.Parallel()
// HTTP 100 is "continue" so it will time out
server, client := testTools(100, "timeout response")
server, client := testTools(http.StatusGatewayTimeout, "{\"message\": \"timeout response\"}")
defer server.Close()

ctx := context.Background()
_, actual := client.Verify(ctx, "timeout", "timeout")

// Actual should be a "request canceled" *url.Error
urlErr, ok := actual.(*url.Error)
if !ok {
t.Errorf("Expected *url.Error, got %T", actual)
if actual == nil {
t.Error("expected error, got nil")
}

if !urlErr.Timeout() {
t.Errorf("got %v\nwant timeout", actual)
if actual.Error() != "timeout response" {
t.Errorf("got %v\nwant %v", actual, "timeout response")
}
}

Expand Down
19 changes: 14 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
module github.com/awa/go-iap

go 1.15
go 1.18

require (
github.com/golang-jwt/jwt/v4 v4.3.0
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.5.0
github.com/google/uuid v1.3.0
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/api v0.48.0
google.golang.org/appengine v1.6.7
)

require (
cloud.google.com/go v0.83.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/googleapis/gax-go/v2 v2.0.5 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20210607140030-00d4fb20b1ae // indirect
google.golang.org/grpc v1.38.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
)

0 comments on commit 32ff8d7

Please sign in to comment.