Ensuring passing context across fission (#2555)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
)
|
||||
|
||||
func TestTracker(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
t.Run("NewTracker", func(test *testing.T) {
|
||||
for _, test := range []struct {
|
||||
name string
|
||||
@@ -101,7 +103,7 @@ func TestTracker(t *testing.T) {
|
||||
defer server.Close()
|
||||
tr.gaAPIURL = server.URL
|
||||
|
||||
t := tr.SendEvent(context.Background(), *test.request)
|
||||
t := tr.SendEvent(ctx, *test.request)
|
||||
if test.status == http.StatusOK {
|
||||
assert.Nil(testing, t, test.expected)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user