diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-01-09 17:12:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-01-09 22:12:13 +0000 |
| commit | 155803de7d5c1df5edd456a45a19008c9ae5ea7b (patch) | |
| tree | 7bdc7501e3450ea2a2fafa2521ff0d6a165a1a0e /data/datasource_git_test.go | |
| parent | d03538dcbc6f7d22e02c44269b63ff1d54020ed4 (diff) | |
Propagate context into datasource read functions (#1282)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'data/datasource_git_test.go')
| -rw-r--r-- | data/datasource_git_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
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)) |
