Sebastiaan van Stijn
2019-12-10 14:24:37 +01:00
parent 79578882a1
commit dd87cd9feb
25 changed files with 630 additions and 276 deletions
+1 -1
View File
@@ -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) {
+4 -4
View File
@@ -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
`,
},
{
@@ -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",
@@ -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",
},
}
@@ -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