コード例 #1
0
func TestMetadataGetAllCluster(t *testing.T) {
	output := runCommand(t, []string{}, config.DeployFilterFlags{
		Repo:    project1.Repo,
		Cluster: "cluster-2",
	})

	assert.Regexp(t, "BuildBranch", output)
	assert.Regexp(t, "master", output)
	assert.Regexp(t, "DeployOn", output)
	assert.Regexp(t, "version advance", output)
	assert.NotRegexp(t, "build success", output)
}
コード例 #2
0
ファイル: require.go プロジェクト: opentable/sous
// NotRegexp asserts that a specified regexp does not match a string.
//
//  assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
//  assert.NotRegexp(t, "^start", "it's not starting")
//
// Returns whether the assertion was successful (true) or not (false).
func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
	if !assert.NotRegexp(t, rx, str, msgAndArgs...) {
		t.FailNow()
	}
}