diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-03 15:26:59 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-03 15:29:58 +0900 |
| commit | ce249d23f1e3d3d90330fd8d02699b4b7c8ccb9b (patch) | |
| tree | 570e686dbbb73180debe99a796bfd1be3fc71c92 /internal/pkg/pkg_test.go | |
| parent | dd5d792d14799148cd6ac56cd24a2a4af6d0f5a6 (diff) | |
internal/pkg: implement http artifact
This is useful for downloading source tarballs from the internet.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/pkg_test.go')
| -rw-r--r-- | internal/pkg/pkg_test.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/pkg/pkg_test.go b/internal/pkg/pkg_test.go index f564572a..c5b5cdca 100644 --- a/internal/pkg/pkg_test.go +++ b/internal/pkg/pkg_test.go @@ -5,6 +5,7 @@ import ( "crypto/sha512" "encoding/base64" "io/fs" + "net/http" "os" "path/filepath" "reflect" @@ -281,6 +282,10 @@ func TestErrors(t *testing.T) { }, 8)), }, "got AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + " instead of deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef"}, + + {"ResponseStatusError", pkg.ResponseStatusError( + http.StatusNotAcceptable, + ), "the requested URL returned non-OK status: Not Acceptable"}, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { |
