"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "service/status/util_test.go" between
drone-2.15.0.tar.gz and drone-2.16.0.tar.gz

About: Drone is a Continuous Delivery system built on (docker) container technology.

util_test.go  (drone-2.15.0):util_test.go  (drone-2.16.0)
skipping to change at line 16 skipping to change at line 16
import ( import (
"testing" "testing"
"github.com/drone/drone/core" "github.com/drone/drone/core"
"github.com/drone/go-scm/scm" "github.com/drone/go-scm/scm"
) )
func TestCreateLabel(t *testing.T) { func TestCreateLabel(t *testing.T) {
tests := []struct { tests := []struct {
name string name string
event string event string
label string label string
deployTo string
}{ }{
{ {
event: core.EventPullRequest, event: core.EventPullRequest,
label: "continuous-integration/drone/pr", label: "continuous-integration/drone/pr",
}, },
{ {
event: core.EventPush, event: core.EventPush,
label: "continuous-integration/drone/push", label: "continuous-integration/drone/push",
}, },
{ {
event: core.EventTag, event: core.EventTag,
label: "continuous-integration/drone/tag", label: "continuous-integration/drone/tag",
}, },
{ {
event: core.EventPromote,
deployTo: "production",
label: "continuous-integration/drone/promote/productio
n",
},
{
event: core.EventPromote,
deployTo: "$production%",
label: "continuous-integration/drone/promote/productio
n",
},
{
event: "unknown", event: "unknown",
label: "continuous-integration/drone", label: "continuous-integration/drone",
}, },
{ {
name: "drone", name: "drone",
event: core.EventPush, event: core.EventPush,
label: "drone/push", label: "drone/push",
}, },
} }
for _, test := range tests { for _, test := range tests {
if got, want := createLabel(test.name, test.event), test.label; g ot != want { if got, want := createLabel(test.name, test.event, test.deployTo) , test.label; got != want {
t.Errorf("Want label %q, got %q", want, got) t.Errorf("Want label %q, got %q", want, got)
} }
} }
} }
func TestCreateDesc(t *testing.T) { func TestCreateDesc(t *testing.T) {
tests := []struct { tests := []struct {
status string status string
desc string desc string
}{ }{
 End of changes. 3 change blocks. 
4 lines changed or deleted 17 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)