From 155803de7d5c1df5edd456a45a19008c9ae5ea7b Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 9 Jan 2022 17:12:13 -0500 Subject: Propagate context into datasource read functions (#1282) Signed-off-by: Dave Henderson --- data/datasource_git_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'data/datasource_git_test.go') diff --git a/data/datasource_git_test.go b/data/datasource_git_test.go index 33771410..0c20c558 100644 --- a/data/datasource_git_test.go +++ b/data/datasource_git_test.go @@ -380,6 +380,7 @@ func TestOpenBareFileRepo(t *testing.T) { } func TestReadGit(t *testing.T) { + ctx := context.Background() repoFS := setupGitRepo(t) overrideFSLoader(repoFS) @@ -389,7 +390,7 @@ func TestReadGit(t *testing.T) { Alias: "hi", URL: mustParseURL("git+file:///bare.git//hello.txt"), } - b, err := readGit(s) + b, err := readGit(ctx, s) assert.NilError(t, err) assert.Equal(t, "hello world", string(b)) @@ -397,7 +398,7 @@ func TestReadGit(t *testing.T) { Alias: "hi", URL: mustParseURL("git+file:///bare.git"), } - b, err = readGit(s) + b, err = readGit(ctx, s) assert.NilError(t, err) assert.Equal(t, "application/array+json", s.mediaType) assert.Equal(t, `["hello.txt"]`, string(b)) -- cgit v1.2.3