Skip to content
Permalink
Browse files
Run gofmt on commands do and integration (#868)
  • Loading branch information
Baptiste Prunot committed Oct 5, 2020
1 parent ac645f1 commit 77fe6a5d768783df3ba86a4e569a797c4dd34b8f
Showing with 13 additions and 14 deletions.
  1. +1 −1 commands/displayers/vpc.go
  2. +2 −2 commands/kubernetes_test.go
  3. +7 −7 do/1_clicks.go
  4. +0 −1 integration/kubernetes_clusters_create_test.go
  5. +2 −2 integration/registry_login_test.go
  6. +1 −1 integration/vpc_update_test.go
@@ -64,7 +64,7 @@ func (v *VPC) KV() []map[string]interface{} {
"URN": v.URN,
"Name": v.Name,
"Description": v.Description,
"IPRange": v.IPRange,
"IPRange": v.IPRange,
"Created": v.CreatedAt,
"Region": v.RegionSlug,
"Default": v.Default,
@@ -72,7 +72,7 @@ var (
APIVersion: "v1",
CurrentContext: "test-context",
Contexts: map[string]*clientcmdapi.Context{
"test-context": &clientcmdapi.Context{
"test-context": {
Cluster: "test-cluster",
},
},
@@ -434,7 +434,7 @@ func TestKubernetesCreate(t *testing.T) {
assert.NoError(t, err)

// Test with 1-clicks specified
config.Doit.Set(config.NS, doctl.ArgOneClicks, []string{"slug1","slug2"})
config.Doit.Set(config.NS, doctl.ArgOneClicks, []string{"slug1", "slug2"})
tm.kubernetes.EXPECT().Create(&r).Return(&testCluster, nil)
tm.oneClick.EXPECT().InstallKubernetes(testCluster.ID, []string{"slug1", "slug2"})
err = testK8sCmdService().RunKubernetesClusterCreate("c-8", 3)(config)
@@ -22,7 +22,7 @@ import (
// OneClickService is the godo OneClickService interface.
type OneClickService interface {
List(string) (OneClicks, error)
InstallKubernetes(string, []string)(string, error)
InstallKubernetes(string, []string) (string, error)
}

var _ OneClickService = &oneClickService{}
@@ -77,16 +77,16 @@ func (ocs *oneClickService) List(oneClickType string) (OneClicks, error) {
return list, nil
}

func (ocs *oneClickService) InstallKubernetes(clusterUUID string, slugs []string)(string, error){
installReq := &godo.InstallKubernetesAppsRequest {
Slugs: slugs,
func (ocs *oneClickService) InstallKubernetes(clusterUUID string, slugs []string) (string, error) {
installReq := &godo.InstallKubernetesAppsRequest{
Slugs: slugs,
ClusterUUID: clusterUUID,
}
}

responseMessage, _, err := ocs.Client.OneClick.InstallKubernetes(context.TODO(), installReq)
if err != nil {
return "", err
}
return responseMessage.Message , nil

return responseMessage.Message, nil
}
@@ -300,4 +300,3 @@ current-context: some-context
}
`
)

@@ -93,7 +93,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) {
expect.NoError(err)

expect.Equal("Logging Docker in to registry.digitalocean.com\n", string(output))
for host, _ := range dc.Auths {
for host := range dc.Auths {
expect.Equal("registry.digitalocean.com", host)
}
})
@@ -128,7 +128,7 @@ var _ = suite("registry/login", func(t *testing.T, when spec.G, it spec.S) {
expect.NoError(err)

expect.Equal("Logging Docker in to registry.digitalocean.com\n", string(output))
for host, _ := range dc.Auths {
for host := range dc.Auths {
expect.Equal("expiring.registry.com", host)
}
})
@@ -109,4 +109,4 @@ ID URN
}
}
`
)
)

0 comments on commit 77fe6a5

Please sign in to comment.