mirror of
https://github.com/harness/drone.git
synced 2025-05-10 20:24:00 +08:00
commit
d5743579ce
@ -140,7 +140,7 @@ func (d *Datadog) Client() *http.Client {
|
|||||||
return d.client
|
return d.client
|
||||||
}
|
}
|
||||||
|
|
||||||
// calculate the differene between now and midnight.
|
// calculate the differences between now and midnight.
|
||||||
func midnightDiff() time.Duration {
|
func midnightDiff() time.Duration {
|
||||||
a := time.Now()
|
a := time.Now()
|
||||||
b := time.Date(a.Year(), a.Month(), a.Day()+1, 0, 0, 0, 0, a.Location())
|
b := time.Date(a.Year(), a.Month(), a.Day()+1, 0, 0, 0, 0, a.Location())
|
||||||
|
@ -271,7 +271,7 @@ func TestTrigger_SkipBranch(t *testing.T) {
|
|||||||
|
|
||||||
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Expect build silenty skipped if branch does not match")
|
t.Errorf("Expect build silently skipped if branch does not match")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -309,7 +309,7 @@ func TestTrigger_SkipEvent(t *testing.T) {
|
|||||||
|
|
||||||
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Expect build silenty skipped if event does not match")
|
t.Errorf("Expect build silently skipped if event does not match")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ func TestTrigger_SkipAction(t *testing.T) {
|
|||||||
|
|
||||||
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
_, err := triggerer.Trigger(noContext, dummyRepo, dummyHook)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("Expect build silenty skipped if action does not match")
|
t.Errorf("Expect build silently skipped if action does not match")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user