harness-drone/server/hook_test.go
2017-07-19 19:39:36 +09:00

31 lines
463 B
Go

package server
import (
"testing"
"github.com/drone/drone/model"
)
func TestMultilineEnvsubst(t *testing.T) {
b := builder{
Repo: &model.Repo{},
Curr: &model.Build{
Message: `aaa
bbb`,
},
Last: &model.Build{},
Netrc: &model.Netrc{},
Secs: []*model.Secret{},
Regs: []*model.Registry{},
Link: "",
Yaml: `pipeline:
xxx:
image: scratch
yyy: ${DRONE_COMMIT_MESSAGE}
`,
}
if _, err := b.Build(); err != nil {
t.Fatal(err)
}
}