Skip to content

Commit

Permalink
Merge branch 'main' into godo-1.104.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewsomething authored Oct 10, 2023
2 parents 8187c3d + 6247ce7 commit 90b5158
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions commands/billing_history_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ var testBillingHistoryList = &do.BillingHistory{
{
Description: "Invoice for May 2018",
Amount: "12.34",
InvoiceID: godo.String("123"),
InvoiceUUID: godo.String("example-uuid"),
InvoiceID: godo.PtrTo("123"),
InvoiceUUID: godo.PtrTo("example-uuid"),
Date: time.Date(2018, 6, 1, 8, 44, 38, 0, time.UTC),
Type: "Invoice",
},
Expand Down
6 changes: 3 additions & 3 deletions commands/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,10 +405,10 @@ func RunRegistryLogin(c *CmdConfig) error {

regCredReq := godo.RegistryDockerCredentialsRequest{
ReadWrite: !readOnly,
ExpirySeconds: godo.Int(defaultRegistryAPITokenExpirySeconds),
ExpirySeconds: godo.PtrTo(defaultRegistryAPITokenExpirySeconds),
}
if expirySeconds != 0 {
regCredReq.ExpirySeconds = godo.Int(expirySeconds)
regCredReq.ExpirySeconds = godo.PtrTo(expirySeconds)
}
if neverExpire {
regCredReq.ExpirySeconds = nil
Expand Down Expand Up @@ -548,7 +548,7 @@ func RunDockerConfig(c *CmdConfig) error {
ReadWrite: readWrite,
}
if expirySeconds != 0 {
regCredReq.ExpirySeconds = godo.Int(expirySeconds)
regCredReq.ExpirySeconds = godo.PtrTo(expirySeconds)
}

dockerCreds, err := c.Registry().DockerCredentials(&regCredReq)
Expand Down
8 changes: 4 additions & 4 deletions commands/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func TestDockerConfig(t *testing.T) {
expect: func(m *mocks.MockRegistryService) {
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: false,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand All @@ -258,7 +258,7 @@ func TestDockerConfig(t *testing.T) {
expect: func(m *mocks.MockRegistryService) {
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: true,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand Down Expand Up @@ -662,7 +662,7 @@ func TestRegistryLogin(t *testing.T) {
m.EXPECT().Endpoint().Return(do.RegistryHostname)
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: true,
ExpirySeconds: godo.Int(3600),
ExpirySeconds: godo.PtrTo(3600),
}).Return(testDockerCredentials, nil)
},
},
Expand All @@ -674,7 +674,7 @@ func TestRegistryLogin(t *testing.T) {
m.EXPECT().Endpoint().Return(do.RegistryHostname)
m.EXPECT().DockerCredentials(&godo.RegistryDockerCredentialsRequest{
ReadWrite: false,
ExpirySeconds: godo.Int(defaultRegistryAPITokenExpirySeconds),
ExpirySeconds: godo.PtrTo(defaultRegistryAPITokenExpirySeconds),
}).Return(testDockerCredentials, nil)
},
},
Expand Down

0 comments on commit 90b5158

Please sign in to comment.