mirror of
https://github.com/harness/drone.git
synced 2025-05-04 10:10:14 +08:00
fix some typos
This commit is contained in:
parent
d924425890
commit
bfc20fc17c
@ -35,9 +35,9 @@ func TestCron(t *testing.T) {
|
|||||||
defer controller.Finish()
|
defer controller.Finish()
|
||||||
|
|
||||||
checkBuild := func(_ context.Context, _ *core.Repository, hook *core.Hook) {
|
checkBuild := func(_ context.Context, _ *core.Repository, hook *core.Hook) {
|
||||||
ignoreHookFileds := cmpopts.IgnoreFields(core.Hook{},
|
ignoreHookFields := cmpopts.IgnoreFields(core.Hook{},
|
||||||
"Source", "Before")
|
"Source", "Before")
|
||||||
if diff := cmp.Diff(hook, dummyHook, ignoreHookFileds); diff != "" {
|
if diff := cmp.Diff(hook, dummyHook, ignoreHookFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -484,6 +484,6 @@ var (
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
ignoreBuildFileds = cmpopts.IgnoreFields(core.Build{},
|
ignoreBuildFields = cmpopts.IgnoreFields(core.Build{},
|
||||||
"Created", "Updated")
|
"Created", "Updated")
|
||||||
)
|
)
|
||||||
|
@ -33,19 +33,19 @@ func TestTrigger(t *testing.T) {
|
|||||||
defer controller.Finish()
|
defer controller.Finish()
|
||||||
|
|
||||||
checkBuild := func(_ context.Context, build *core.Build, stages []*core.Stage) {
|
checkBuild := func(_ context.Context, build *core.Build, stages []*core.Stage) {
|
||||||
if diff := cmp.Diff(build, dummyBuild, ignoreBuildFileds); diff != "" {
|
if diff := cmp.Diff(build, dummyBuild, ignoreBuildFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
if diff := cmp.Diff(stages, dummyStages, ignoreStageFileds); diff != "" {
|
if diff := cmp.Diff(stages, dummyStages, ignoreStageFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkStatus := func(_ context.Context, _ *core.User, req *core.StatusInput) error {
|
checkStatus := func(_ context.Context, _ *core.User, req *core.StatusInput) error {
|
||||||
if diff := cmp.Diff(req.Build, dummyBuild, ignoreBuildFileds); diff != "" {
|
if diff := cmp.Diff(req.Build, dummyBuild, ignoreBuildFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
if diff := cmp.Diff(req.Repo, dummyRepo, ignoreStageFileds); diff != "" {
|
if diff := cmp.Diff(req.Repo, dummyRepo, ignoreStageFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
@ -88,7 +88,7 @@ func TestTrigger(t *testing.T) {
|
|||||||
t.Error(err)
|
t.Error(err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if diff := cmp.Diff(build, dummyBuild, ignoreBuildFileds); diff != "" {
|
if diff := cmp.Diff(build, dummyBuild, ignoreBuildFields); diff != "" {
|
||||||
t.Errorf(diff)
|
t.Errorf(diff)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -487,9 +487,9 @@ var (
|
|||||||
Data: "kind: pipeline\ntrigger: { event: { exclude: push } }",
|
Data: "kind: pipeline\ntrigger: { event: { exclude: push } }",
|
||||||
}
|
}
|
||||||
|
|
||||||
ignoreBuildFileds = cmpopts.IgnoreFields(core.Build{},
|
ignoreBuildFields = cmpopts.IgnoreFields(core.Build{},
|
||||||
"Created", "Updated")
|
"Created", "Updated")
|
||||||
|
|
||||||
ignoreStageFileds = cmpopts.IgnoreFields(core.Stage{},
|
ignoreStageFields = cmpopts.IgnoreFields(core.Stage{},
|
||||||
"Created", "Updated")
|
"Created", "Updated")
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user