Skip to content

Commit

Permalink
Merge branch 'master' into gtm_schema_1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
edglynes committed Feb 18, 2020
2 parents e9024bf + c993444 commit aec4de6
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 77 deletions.
55 changes: 27 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
language: go
sudo: false
go:
- 1.6
- 1.7
- 1.8
- 1.9
- "1.10"
- "1.11.x"
- tip
env:
# Install dependencies based on the glide.lock
#- DEPS=''
# Upgrade to the latest dependencies
#- DEPS='-update'
- GO111MODULE=on

# Fix patching for forks
go_import_path: github.com/akamai/AkamaiOPEN-edgegrid-golang

cache:
directories:
- $GOPATH/pkg/mod

matrix:
fast_finish: true
include:
- go: 1.12.x
- go: 1.13.x
- go: 1.x
- go: tip
allow_failures:
# Allow Go 1.6, and tip to fail, as well as whenever we use upgraded dependencies
- go: 1.6
- go: 1.7
- go: 1.8
- go: tip
- env: DEPS='-update'
before_install:
# Fix pathing for forks
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- mkdir -p $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang
- cd $HOME/gopath/src/github.com/akamai/AkamaiOPEN-edgegrid-golang
- go: tip

env:
global:
- GO111MODULE=on

install:
- go mod tidy
- git diff --exit-code go.mod
- git diff --exit-code go.sum
- go mod download

script:
- ls -d */ | grep -vE '(examples|testdata|vendor)' | xargs -I {package} go test -v ./{package}
- go test -v ./...

notifications:
slack:
secure: sf5CrgPZ2UjTmGFg1hbSdEB3GXyBybeoZQDOI/pk1ywId4mjN1HgAFooDaZx9Qn+orhdQny3jMcdx1qyLe9YtV7WhIRGRQWgJiZ7H+6YRCWYNnSopsSDJ91Q/PaQrgsPSIHL+vfSkyW9iDXrT09SK0IOlWHTrrYMcJiiOCkx2QZgIBMASXWzCRFMSxfqDBuZ8FuNMhcYTIEz4xBLO7seAl9+FvQTzpSXXyEwoKeZjLx2J2+9J1onx9ccnb5ioPeICRuiIKlSvu7VfFkDgc8k8luoktKSG+ZRpwcdae8VoQCzyt7OPzI1kSoZZw20gp2oYQcRkwpLBM007JkW2+KQraF5tZ9Ok8C1vG97lsByhd23r022joyTGpD+TZqWfXUX7K461GJJpohWoFlHshOaAwNj37XWKD8REpb0Qj7vABIfH+gXQhlJHBRCfKMRf12ILzU2yUbbQftwcPkcivNHGknEAkHIjWKk5lDH9uC2is5nWJHDCt/h/xa/AfvNbt28Kol+8yexRypnmorTzG9CBHq+pKrm48cBEGUxREiUjN7v5RGgJH+DB5nKkV4nH3P7mvWV+mkDcAXZPhDprplFl1Q7YV56OyjAY+dlpY6xyGopDz9DmmZifqLxR6mP9eSCIeIM9VsDJUwhfnnwyxRuuzZWFa+Adu8kuaBR8RqjcdE=
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,6 @@ This library implements an Authentication handler for [net/http](https://golang.
that provides the [Akamai OPEN Edgegrid Authentication](https://developer.akamai.com/introduction/Client_Auth.html)
scheme. For more information visit the [Akamai OPEN Developer Community](https://developer.akamai.com).

## Installation

This package uses `dep` to manage to dependencies and installation. To install `dep`, see the [`dep` install documentation](https://github.com/golang/dep#installation)

```bash
$ dep ensure -add github.com/akamai/AkamaiOPEN-edgegrid-golang
```

## Usage

GET Example:
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/asmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"
"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/cidrmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestCidrMap = "testCidrMap"
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/datacenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"

"fmt"
)
Expand Down
9 changes: 5 additions & 4 deletions configgtm-v1_3/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/h2non/gock.v1"
)

func instantiateDomain() *Domain {
Expand Down Expand Up @@ -565,8 +566,8 @@ func TestCreateDomain(t *testing.T) {
testDomain := NewDomain(gtmTestDomain, "basic")
qArgs := make(map[string]string)

statResponse, _ := testDomain.Create(qArgs)
//assert.NoError(t, err)
statResponse, err := testDomain.Create(qArgs)
require.NoError(t, err)
assert.Equal(t, gtmTestDomain, statResponse.Resource.Name)

}
Expand Down Expand Up @@ -745,7 +746,7 @@ func TestUpdateDomain(t *testing.T) {
//testDomain.MaxResources = 9999
qArgs := make(map[string]string)
statResp, err := testDomain.Update(qArgs)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, statResp.ChangeId, "df6c04e4-6327-4e0f-8872-bfe9fb2693d2")

}
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/geomap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestGeoMap = "testGeoMap"
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/property_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"

"fmt"
)
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_3/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestResource = "testResource"
Expand Down
11 changes: 9 additions & 2 deletions configgtm-v1_3/service.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package configgtm

import (
"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/sirupsen/logrus"
"net/http"
"net/http/httputil"

"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/sirupsen/logrus"
)

var (
Expand All @@ -28,6 +29,9 @@ func Init(config edgegrid.Config) {

// Utility func to print http req
func printHttpRequest(req *http.Request, body bool) {
if req == nil {
return
}

b, err := httputil.DumpRequestOut(req, body)
if err == nil {
Expand All @@ -37,6 +41,9 @@ func printHttpRequest(req *http.Request, body bool) {

// Utility func to print http response
func printHttpResponse(res *http.Response, body bool) {
if res == nil {
return
}

b, err := httputil.DumpResponse(res, body)
if err == nil {
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/asmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/edgegrid"
"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"
"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/cidrmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestCidrMap = "testCidrMap"
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/datacenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"

"fmt"
)
Expand Down
7 changes: 4 additions & 3 deletions configgtm-v1_4/domain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/h2non/gock.v1"
)

func instantiateDomain() *Domain {
Expand Down Expand Up @@ -566,7 +567,7 @@ func TestCreateDomain(t *testing.T) {
qArgs := make(map[string]string)

statResponse, err := testDomain.Create(qArgs)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, gtmTestDomain, statResponse.Resource.Name)

}
Expand Down Expand Up @@ -745,7 +746,7 @@ func TestUpdateDomain(t *testing.T) {
//testDomain.MaxResources = 9999
qArgs := make(map[string]string)
statResp, err := testDomain.Update(qArgs)
assert.NoError(t, err)
require.NoError(t, err)
assert.Equal(t, statResp.ChangeId, "df6c04e4-6327-4e0f-8872-bfe9fb2693d2")

}
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/geomap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestGeoMap = "testGeoMap"
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/property_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"

"fmt"
)
Expand Down
2 changes: 1 addition & 1 deletion configgtm-v1_4/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

"github.com/akamai/AkamaiOPEN-edgegrid-golang/jsonhooks-v1"

"github.com/h2non/gock"
"github.com/stretchr/testify/assert"
"gopkg.in/h2non/gock.v1"
)

var GtmTestResource = "testResource"
Expand Down
2 changes: 1 addition & 1 deletion edgegrid.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"time"
"unicode"

"github.com/go-ini/ini"
"github.com/google/uuid"
"github.com/mitchellh/go-homedir"
log "github.com/sirupsen/logrus"
"gopkg.in/ini.v1"
)

const defaultSection = "DEFAULT"
Expand Down
2 changes: 1 addition & 1 deletion edgegrid/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"
"strings"

"github.com/go-ini/ini"
"github.com/mitchellh/go-homedir"
"gopkg.in/ini.v1"
)

// Config struct provides all the necessary fields to
Expand Down
16 changes: 6 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
module github.com/akamai/AkamaiOPEN-edgegrid-golang

go 1.12

require (
github.com/go-ini/ini v1.44.0
github.com/google/go-querystring v1.0.0
github.com/google/uuid v1.1.1
github.com/h2non/gock v0.0.0-00010101000000-000000000000
github.com/mitchellh/go-homedir v1.1.0
github.com/sirupsen/logrus v1.4.2
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
github.com/stretchr/testify v1.3.0
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.1.0
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/stretchr/testify v1.4.0
github.com/xeipuuv/gojsonschema v1.2.0
gopkg.in/h2non/gock.v1 v1.0.15
gopkg.in/ini.v1 v1.44.0 // indirect
gopkg.in/ini.v1 v1.51.1
)

replace github.com/h2non/gock => gopkg.in/h2non/gock.v1 v1.0.14
20 changes: 12 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/go-ini/ini v1.44.0 h1:8+SRbfpRFlIunpSum4BEf1ClTtVjOgKzgBv9pHFkI6w=
github.com/go-ini/ini v1.44.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8=
github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY=
Expand All @@ -25,27 +23,33 @@ github.com/sirupsen/logrus v1.4.2 h1:SPIRibHv4MatM3XXNO2BJeFLZwZ2LvZgfQ5+UNI2im4
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.1.0 h1:ngVtJC9TY/lg0AA/1k48FYhBrhRoFlEmWzsehpNAaZg=
github.com/xeipuuv/gojsonschema v1.1.0/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894 h1:Cz4ceDQGXuKRnVBDTS23GTn/pU5OE2C0WrNTOYK1Uuc=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/h2non/gock.v1 v1.0.15 h1:SzLqcIlb/fDfg7UvukMpNcWsu7sI5tWwL+KCATZqks0=
gopkg.in/h2non/gock.v1 v1.0.15/go.mod h1:sX4zAkdYX1TRGJ2JY156cFspQn4yRWn6p9EMdODlynE=
gopkg.in/ini.v1 v1.44.0 h1:YRJzTUp0kSYWUVFF5XAbDFfyiqwsl0Vb9R8TVP5eRi0=
gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/ini.v1 v1.51.1 h1:GyboHr4UqMiLUybYjd22ZjQIKEJEpgtLXtuGbR21Oho=
gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

0 comments on commit aec4de6

Please sign in to comment.