Skip to content

Commit

Permalink
Merge pull request #1936 from thaJeztah/bump_jwt_go
Browse files Browse the repository at this point in the history
bump dgrijalva/jwt-go v3.2.0, docker/licencing 7c3de6a
  • Loading branch information
silvin-lubecki authored Dec 12, 2019
2 parents 08eaead + dd87cd9 commit 0fd5c16
Show file tree
Hide file tree
Showing 25 changed files with 631 additions and 277 deletions.
2 changes: 1 addition & 1 deletion cli/command/engine/activate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (c mockLicenseClient) StoreLicense(ctx context.Context, dclnt licensing.Wra
func (c mockLicenseClient) LoadLocalLicense(ctx context.Context, dclnt licensing.WrappedDockerClient) (*model.Subscription, error) {
return nil, fmt.Errorf("not implemented")
}
func (c mockLicenseClient) SummarizeLicense(res *model.CheckResponse, keyID string) *model.Subscription {
func (c mockLicenseClient) SummarizeLicense(res *model.CheckResponse) *model.Subscription {
return nil
}
func TestActivateDisplayOnlyHub(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cli/command/engine/licenses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ func TestSubscriptionContextWrite(t *testing.T) {
},
{
formatter.Context{Format: NewSubscriptionsFormat("table", true)},
`1:License Name: name1 Quantity: 10 nodes Expiration date: 2020-01-01
2:License Name: name2 Quantity: 20 nodes Expiration date: 2020-01-01
`1:License Name: name1 Components: 10 nodes Expiration date: 2020-01-01
2:License Name: name2 Components: 20 nodes Expiration date: 2020-01-01
`,
},
{
Expand Down Expand Up @@ -197,7 +197,7 @@ func TestSubscriptionContextWriteJSON(t *testing.T) {
"ProductRatePlan": "",
"ProductRatePlanID": "",
"State": "",
"Summary": "License Name: name1\tQuantity: 10 nodes\tExpiration date: 2020-01-01",
"Summary": "License Name: name1\tComponents: 10 nodes\tExpiration date: 2020-01-01",
},
{
"Owner": "owner2",
Expand All @@ -219,7 +219,7 @@ func TestSubscriptionContextWriteJSON(t *testing.T) {
"ProductRatePlan": "",
"ProductRatePlanID": "",
"State": "",
"Summary": "License Name: name2\tQuantity: 20 nodes\tExpiration date: 2020-01-01",
"Summary": "License Name: name2\tComponents: 20 nodes\tExpiration date: 2020-01-01",
},
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
License: Quantity: 1 Nodes Expiration date: 2018-03-18 Expired! You will no longer receive updates. Please renew at https://docker.com/licensing
License: Components: 1 Nodes Expiration date: 2018-03-18 Expired! You will no longer receive updates. Please renew at https://docker.com/licensing
6 changes: 3 additions & 3 deletions internal/licenseutils/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type (
parseLicenseFunc func(license []byte) (parsedLicense *model.IssuedLicense, err error)
storeLicenseFunc func(ctx context.Context, dclnt licensing.WrappedDockerClient, licenses *model.IssuedLicense, localRootDir string) error
loadLocalLicenseFunc func(ctx context.Context, dclnt licensing.WrappedDockerClient) (*model.Subscription, error)
summarizeLicenseFunc func(*model.CheckResponse, string) *model.Subscription
summarizeLicenseFunc func(*model.CheckResponse) *model.Subscription
}
)

Expand Down Expand Up @@ -103,9 +103,9 @@ func (c *fakeLicensingClient) LoadLocalLicense(ctx context.Context, dclnt licens
return nil, nil
}

func (c *fakeLicensingClient) SummarizeLicense(cr *model.CheckResponse, keyid string) *model.Subscription {
func (c *fakeLicensingClient) SummarizeLicense(cr *model.CheckResponse) *model.Subscription {
if c.summarizeLicenseFunc != nil {
return c.summarizeLicenseFunc(cr, keyid)
return c.summarizeLicenseFunc(cr)
}
return nil
}
2 changes: 1 addition & 1 deletion internal/licenseutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func GetLicenseSummary(ctx context.Context, license model.IssuedLicense) (string
if err != nil {
return "", err
}
return lclient.SummarizeLicense(cr, license.KeyID).String(), nil
return lclient.SummarizeLicense(cr).String(), nil
}

func doLoadLocalIssuedLicense(ctx context.Context, filename string, lclient licensing.Client) (*model.IssuedLicense, error) {
Expand Down
4 changes: 2 additions & 2 deletions vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ github.com/coreos/etcd d57e8b8d97adfc4a6c224fe11671
github.com/cpuguy83/go-md2man 20f5889cbdc3c73dbd2862796665e7c465ade7d1 # v1.0.8
github.com/creack/pty 3a6a957789163cacdfe0e291617a1c8e80612c11 # v1.1.9
github.com/davecgh/go-spew 8991bc29aa16c548c550c7ff78260e27b9ab7c73 # v1.1.1
github.com/dgrijalva/jwt-go a2c85815a77d0f951e33ba4db5ae93629a1530af
github.com/dgrijalva/jwt-go 06ea1031745cb8b3dab3f6a236daf2b0aa468b7e # v3.2.0
github.com/docker/compose-on-kubernetes 78e6a00beda64ac8ccb9fec787e601fe2ce0d5bb # v0.5.0-alpha1
github.com/docker/distribution 0d3efadf0154c2b8a4e7b6621fff9809655cc580
github.com/docker/docker a09e6e323e55e1a9b21df9c2c555f5668df3ac9b
Expand All @@ -24,7 +24,7 @@ github.com/docker/go-events 9461782956ad83b30282bf90e31f
github.com/docker/go-metrics d466d4f6fd960e01820085bd7e1a24426ee7ef18
github.com/docker/go-units 519db1ee28dcc9fd2474ae59fca29a810482bfb1 # v0.4.0
github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
github.com/docker/licensing 9781369abdb5281cdc07a2a446c6df01347ec793
github.com/docker/licensing 5f0f1276fe42dd721c1c093604995a9f758ace21
github.com/docker/swarmkit 7dded76ec532741c1ad9736cd2bb6d6661f0a386
github.com/evanphx/json-patch 72bf35d0ff611848c1dc9df0f976c81192392fa5 # v4.1.0
github.com/gofrs/flock 392e7fae8f1b0bdbd67dad7237d23f618feb6dbb # v0.7.1
Expand Down
76 changes: 39 additions & 37 deletions vendor/github.com/dgrijalva/jwt-go/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 134 additions & 0 deletions vendor/github.com/dgrijalva/jwt-go/claims.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/github.com/dgrijalva/jwt-go/ecdsa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0fd5c16

Please sign in to comment.