mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 16:31:01 +00:00
fixed yaml unit tests
This commit is contained in:
parent
2bb47ed7cb
commit
66aa18922f
1 changed files with 0 additions and 30 deletions
|
@ -128,35 +128,5 @@ func Test_normalize(t *testing.T) {
|
|||
g.Assert(c.Pipeline[0].Image).Equal("golang:1.5")
|
||||
})
|
||||
})
|
||||
|
||||
g.Describe("plugins", func() {
|
||||
|
||||
g.It("should prepend namespace", func() {
|
||||
c := newConfig(&yaml.Container{
|
||||
Image: "slack",
|
||||
})
|
||||
|
||||
ImageNamespace(c, "plugins")
|
||||
g.Assert(c.Pipeline[0].Image).Equal("plugins/slack")
|
||||
})
|
||||
|
||||
g.It("should not override existing namespace", func() {
|
||||
c := newConfig(&yaml.Container{
|
||||
Image: "index.docker.io/drone/git",
|
||||
})
|
||||
|
||||
ImageNamespace(c, "plugins")
|
||||
g.Assert(c.Pipeline[0].Image).Equal("index.docker.io/drone/git")
|
||||
})
|
||||
|
||||
g.It("should replace underscores with dashes", func() {
|
||||
c := newConfig(&yaml.Container{
|
||||
Image: "gh_pages",
|
||||
})
|
||||
|
||||
ImageName(c)
|
||||
g.Assert(c.Pipeline[0].Image).Equal("gh-pages")
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue