本文整理汇总了Golang中github.com/evergreen-ci/evergreen/model.Task.DisplayName方法的典型用法代码示例。如果您正苦于以下问题:Golang Task.DisplayName方法的具体用法?Golang Task.DisplayName怎么用?Golang Task.DisplayName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/evergreen-ci/evergreen/model.Task
的用法示例。
在下文中一共展示了Task.DisplayName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestTaskToJQL
func TestTaskToJQL(t *testing.T) {
Convey("Given a task with with two failed tests and one successful test, "+
"the jql should contian only the failed test names", t, func() {
task1 := model.Task{}
task1.TestResults = []model.TestResult{
{Status: "fail", TestFile: "foo.js"},
{Status: "success", TestFile: "bar.js"},
{Status: "fail", TestFile: "baz.js"},
}
task1.DisplayName = "foobar"
jQL1 := taskToJQL(&task1)
referenceJQL1 := fmt.Sprintf(JQLBFQuery, "summary~\"foo.js\" or summary~\"baz.js\"")
So(jQL1, ShouldEqual, referenceJQL1)
})
Convey("Given a task with with oo failed tests, "+
"the jql should contian only the failed task name", t, func() {
task2 := model.Task{}
task2.TestResults = []model.TestResult{}
task2.DisplayName = "foobar"
jQL2 := taskToJQL(&task2)
referenceJQL2 := fmt.Sprintf(JQLBFQuery, "summary~\"foobar\"")
So(jQL2, ShouldEqual, referenceJQL2)
})
}