Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
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
4 changes: 2 additions & 2 deletions config/load_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func TestLoad(t *testing.T) {
"DRONE_DATABASE_DRIVER": "mysql",
"DRONE_DATABASE_DATASOURCE": "user:password@/dbname",
"DRONE_DIGITALOCEAN_TOKEN": "2573633eb",
"DRONE_DIGITALOCEAN_IMAGE": "docker-18-04",
"DRONE_DIGITALOCEAN_IMAGE": "docker-20-04",
"DRONE_DIGITALOCEAN_REGION": "ncy1",
"DRONE_DIGITALOCEAN_SSHKEY": "/path/to/ssh/key",
"DRONE_DIGITALOCEAN_SIZE": "s-1vcpu-1gb",
Expand Down Expand Up @@ -244,7 +244,7 @@ var jsonConfig = []byte(`{
},
"DigitalOcean": {
"Token": "2573633eb",
"Image": "docker-18-04",
"Image": "docker-20-04",
"Region": "ncy1",
"SSHKey": "/path/to/ssh/key",
"Size": "s-1vcpu-1gb",
Expand Down
2 changes: 1 addition & 1 deletion drivers/digitalocean/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func testInstance(instance *autoscaler.Instance) func(t *testing.T) {
if got, want := instance.ID, "3164494"; got != want {
t.Errorf("Want droplet ID %v, got %v", want, got)
}
if got, want := instance.Image, "docker-18-04"; got != want {
if got, want := instance.Image, "docker-20-04"; got != want {
t.Errorf("Want droplet Image %v, got %v", want, got)
}
if got, want := instance.Name, "example.com"; got != want {
Expand Down
2 changes: 1 addition & 1 deletion drivers/digitalocean/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func New(opts ...Option) autoscaler.Provider {
p.size = "s-2vcpu-4gb"
}
if p.image == "" {
p.image = "docker-18-04"
p.image = "docker-20-04"
}
if p.userdata == nil {
p.userdata = userdataT
Expand Down
2 changes: 1 addition & 1 deletion drivers/digitalocean/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import "testing"

func TestDefaults(t *testing.T) {
p := New().(*provider)
if got, want := p.image, "docker-18-04"; got != want {
if got, want := p.image, "docker-20-04"; got != want {
t.Errorf("Want image %q, got %q", want, got)
}
if got, want := p.region, "nyc1"; got != want {
Expand Down
8 changes: 4 additions & 4 deletions server/servers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func TestHandleServerDelete(t *testing.T) {

server := &autoscaler.Server{
Name: "i-5203422c",
Image: "docker-18-04",
Image: "docker-20-04",
Region: "nyc1",
Size: "s-1vcpu-1gb",
}
Expand Down Expand Up @@ -233,7 +233,7 @@ func TestHandleServerDeleteFailure(t *testing.T) {

server := &autoscaler.Server{
Name: "i-5203422c",
Image: "docker-18-04",
Image: "docker-20-04",
Region: "nyc1",
Size: "s-1vcpu-1gb",
}
Expand Down Expand Up @@ -270,7 +270,7 @@ func TestHandleServerDeleteErrorState(t *testing.T) {
ID: "",
State: autoscaler.StateError,
Name: "i-5203422c",
Image: "docker-18-04",
Image: "docker-20-04",
Region: "nyc1",
Size: "s-1vcpu-1gb",
}
Expand Down Expand Up @@ -299,7 +299,7 @@ func TestHandleServerForceDeleteErrorState(t *testing.T) {
ID: "i-5203422c",
State: autoscaler.StateError,
Name: "i-5203422c",
Image: "docker-18-04",
Image: "docker-20-04",
Region: "nyc1",
Size: "s-1vcpu-1gb",
}
Expand Down