Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade godo to v1.45.0 #861

Merged
merged 1 commit into from
Sep 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 12 additions & 21 deletions commands/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ func TestAppsCommand(t *testing.T) {

var testAppSpec = godo.AppSpec{
Name: "test",
Services: []godo.AppServiceSpec{
Services: []*godo.AppServiceSpec{
{
Name: "service",
GitHub: godo.GitHubSourceSpec{
GitHub: &godo.GitHubSourceSpec{
Repo: "digitalocean/doctl",
Branch: "master",
},
Expand Down Expand Up @@ -182,7 +182,6 @@ func TestRunAppsCreateDeployment(t *testing.T) {
Steps: []*godo.DeploymentProgressStep{{
Name: "name",
Status: "pending",
Attempts: 0,
StartedAt: time.Now(),
}},
},
Expand Down Expand Up @@ -220,7 +219,6 @@ func TestRunAppsGetDeployment(t *testing.T) {
Steps: []*godo.DeploymentProgressStep{{
Name: "name",
Status: "pending",
Attempts: 0,
StartedAt: time.Now(),
}},
},
Expand Down Expand Up @@ -258,7 +256,6 @@ func TestRunAppsListDeployments(t *testing.T) {
Steps: []*godo.DeploymentProgressStep{{
Name: "name",
Status: "pending",
Attempts: 0,
StartedAt: time.Now(),
}},
},
Expand Down Expand Up @@ -348,23 +345,23 @@ static_sites:
func Test_parseAppSpec(t *testing.T) {
expectedSpec := &godo.AppSpec{
Name: "test",
Services: []godo.AppServiceSpec{
Services: []*godo.AppServiceSpec{
{
Name: "web",
GitHub: godo.GitHubSourceSpec{
GitHub: &godo.GitHubSourceSpec{
Repo: "digitalocean/sample-golang",
Branch: "master",
},
},
},
StaticSites: []godo.AppStaticSiteSpec{
StaticSites: []*godo.AppStaticSiteSpec{
{
Name: "static",
Git: godo.GitSourceSpec{
Git: &godo.GitSourceSpec{
RepoCloneURL: "git@github.com:digitalocean/sample-gatsby.git",
Branch: "master",
},
Routes: []godo.AppRouteSpec{
Routes: []*godo.AppRouteSpec{
{Path: "/static"},
},
},
Expand Down Expand Up @@ -466,11 +463,9 @@ func TestRunAppSpecGet(t *testing.T) {
require.NoError(t, err)
require.Equal(t, `name: test
services:
- git: {}
github:
- github:
branch: master
repo: digitalocean/doctl
health_check: {}
name: service
`, buf.String())
})
Expand All @@ -484,18 +479,16 @@ services:
err := RunAppsSpecGet(config)
require.NoError(t, err)
require.Equal(t, `{
"name": "test",
"services": [
{
"name": "service",
"git": {},
"github": {
"repo": "digitalocean/doctl",
"branch": "master"
},
"health_check": {}
}
}
],
"name": "test"
]
}
`, buf.String())
})
Expand All @@ -521,11 +514,9 @@ services:
require.NoError(t, err)
require.Equal(t, `name: test
services:
- git: {}
github:
- github:
branch: master
repo: digitalocean/doctl
health_check: {}
name: service
`, buf.String())
})
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect
github.com/cpuguy83/go-md2man v1.0.10 // indirect
github.com/creack/pty v1.1.7
github.com/digitalocean/godo v1.44.0
github.com/digitalocean/godo v1.45.0
github.com/docker/cli v0.0.0-20200622130859-87db43814b48
github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible // indirect
github.com/docker/docker-credential-helpers v0.6.3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ 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/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
github.com/digitalocean/godo v1.44.0 h1:IMElzMUpO1dVR8qjSg53+5vDkOLzMbhJt4yTAq7NGCQ=
github.com/digitalocean/godo v1.44.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU=
github.com/digitalocean/godo v1.45.0 h1:Hg4Q216Xr0AJjnAxK4bkP/qacj4svGaapWRfC8z9URc=
github.com/digitalocean/godo v1.45.0/go.mod h1:p7dOjjtSBqCTUksqtA5Fd3uaKs9kyTq2xcz76ulEJRU=
github.com/docker/cli v0.0.0-20200622130859-87db43814b48 h1:AC8qbhi/SjYf4iN2W3jSsofZGHWPjG8pjf5P143KUM8=
github.com/docker/cli v0.0.0-20200622130859-87db43814b48/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/docker v17.12.0-ce-rc1.0.20200531234253-77e06fda0c94+incompatible h1:PmGHHCZ43l6h8aZIi+Xa+z1SWe4dFImd5EK3TNp1jlo=
Expand Down
15 changes: 6 additions & 9 deletions integration/apps_spec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,9 @@ var _ = suite("apps/spec/get", func(t *testing.T, when spec.G, it spec.S) {

expectedOutput := `name: test
services:
- git: {}
github:
- github:
branch: master
repo: digitalocean/doctl
health_check: {}
name: service`
expect.Equal(expectedOutput, strings.TrimSpace(string(output)))
})
Expand All @@ -109,11 +107,9 @@ services:

expectedOutput := `name: test
services:
- git: {}
github:
- github:
branch: new-branch
repo: digitalocean/doctl
health_check: {}
name: service`
expect.Equal(expectedOutput, strings.TrimSpace(string(output)))
})
Expand Down Expand Up @@ -164,15 +160,16 @@ var _ = suite("apps/spec/validate", func(t *testing.T, when spec.G, it spec.S) {
)
testSpec := `name: test
services:
github:
name: service
github:
repo: digitalocean/doctl
name: service`
`
cmd.Stdin = strings.NewReader(testSpec)

output, err := cmd.CombinedOutput()
expect.Equal("exit status 1", err.Error())

expectedOutput := "Error: Failed to parse app spec: json: cannot unmarshal object into Go struct field AppSpec.services of type []godo.AppServiceSpec"
expectedOutput := "Error: Failed to parse app spec: json: cannot unmarshal object into Go struct field AppSpec.services of type []*godo.AppServiceSpec"
expect.Equal(expectedOutput, strings.TrimSpace(string(output)))
})
})
5 changes: 2 additions & 3 deletions integration/apps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ var (
testAppTime = time.Unix(1, 0).UTC()
testAppSpec = godo.AppSpec{
Name: "test",
Services: []godo.AppServiceSpec{
Services: []*godo.AppServiceSpec{
{
Name: "service",
GitHub: godo.GitHubSourceSpec{
GitHub: &godo.GitHubSourceSpec{
Repo: "digitalocean/doctl",
Branch: "master",
},
Expand All @@ -52,7 +52,6 @@ var (
Steps: []*godo.DeploymentProgressStep{{
Name: "name",
Status: "pending",
Attempts: 0,
StartedAt: testAppTime,
}},
},
Expand Down
8 changes: 8 additions & 0 deletions vendor/github.com/digitalocean/godo/CHANGELOG.md

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

Loading