diff options
Diffstat (limited to 'langs/i18n/i18n_test.go')
-rw-r--r-- | langs/i18n/i18n_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/langs/i18n/i18n_test.go b/langs/i18n/i18n_test.go index 0048d4b1b..cddfaf5a2 100644 --- a/langs/i18n/i18n_test.go +++ b/langs/i18n/i18n_test.go @@ -14,6 +14,7 @@ package i18n import ( + "context" "fmt" "path/filepath" "testing" @@ -408,9 +409,10 @@ other = "{{ . }} miesiąca" c.Assert(d.LoadResources(), qt.IsNil) f := tp.t.Func(test.lang) + ctx := context.Background() for _, variant := range test.variants { - c.Assert(f(test.id, variant.Key), qt.Equals, variant.Value, qt.Commentf("input: %v", variant.Key)) + c.Assert(f(ctx, test.id, variant.Key), qt.Equals, variant.Value, qt.Commentf("input: %v", variant.Key)) c.Assert(int(depsCfg.Logger.LogCounters().WarnCounter.Count()), qt.Equals, 0) } @@ -422,7 +424,7 @@ other = "{{ . }} miesiąca" func doTestI18nTranslate(t testing.TB, test i18nTest, cfg config.Provider) string { tp := prepareTranslationProvider(t, test, cfg) f := tp.t.Func(test.lang) - return f(test.id, test.args) + return f(context.Background(), test.id, test.args) } type countField struct { @@ -542,7 +544,7 @@ func BenchmarkI18nTranslate(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { f := tp.t.Func(test.lang) - actual := f(test.id, test.args) + actual := f(context.Background(), test.id, test.args) if actual != test.expected { b.Fatalf("expected %v got %v", test.expected, actual) } |