mirror of
https://github.com/kolaente/docker-db-backup.git
synced 2026-03-25 05:53:48 +01:00
fix(deps): update module github.com/docker/docker to v28 (#3)
Also updates all affected new types. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: kolaente <k@knt.li>
This commit is contained in:
30
dump_test.go
30
dump_test.go
@@ -1,37 +1,37 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/api/types/container"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/docker/docker/api/types/container"
|
||||
)
|
||||
|
||||
func TestNewDumperFromContainer(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
container *types.ContainerJSON
|
||||
want string
|
||||
name string
|
||||
ctr *container.InspectResponse
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "mysql",
|
||||
container: &types.ContainerJSON{Config: &container.Config{Image: "mysql"}},
|
||||
want: "MysqlDumper",
|
||||
name: "mysql",
|
||||
ctr: &container.InspectResponse{Config: &container.Config{Image: "mysql"}},
|
||||
want: "MysqlDumper",
|
||||
},
|
||||
{
|
||||
name: "mariadb",
|
||||
container: &types.ContainerJSON{Config: &container.Config{Image: "mysql"}},
|
||||
want: "MysqlDumper",
|
||||
name: "mariadb",
|
||||
ctr: &container.InspectResponse{Config: &container.Config{Image: "mysql"}},
|
||||
want: "MysqlDumper",
|
||||
},
|
||||
{
|
||||
name: "postgres",
|
||||
container: &types.ContainerJSON{Config: &container.Config{Image: "postgres"}},
|
||||
want: "PostgresDumper",
|
||||
name: "postgres",
|
||||
ctr: &container.InspectResponse{Config: &container.Config{Image: "postgres"}},
|
||||
want: "PostgresDumper",
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := NewDumperFromContainer(tt.container)
|
||||
got := NewDumperFromContainer(tt.ctr)
|
||||
if reflect.TypeOf(got).Elem().Name() != tt.want {
|
||||
t.Errorf("NewDumperFromContainer() is %s, want %s", got, tt.want)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user