Skip to content

Commit

Permalink
feat : yml test code
Browse files Browse the repository at this point in the history
  • Loading branch information
seipan committed Jul 14, 2023
1 parent edbef28 commit 613630a
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion yml_test.go
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
package csql
package csql

import "testing"

func TestYmlFileReadYmlFile(t *testing.T) {
t.Skip("Skip YmlFile.ReadYmlFile() test")
cases := []struct {
path string
want string
}{
{
path: "test.yml",
want: "mysql://root:root@tcp(localhost:3306)/test",
},
}
for _, c := range cases {
c := c
t.Run(c.path, func(t *testing.T) {
t.Parallel()
y := YmlFile{path: c.path}
got, err := y.ReadYmlFile()
if err != nil {
t.Errorf("YmlFile.ReadYmlFile() error = %v", err)
return
}
if got.(Yml).dns != c.want {
t.Errorf("YmlFile.ReadYmlFile() = %v, want %v", got, c.want)
}
})
}
}

0 comments on commit 613630a

Please sign in to comment.