aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/pkg_test.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-03 15:26:59 +0900
committerOphestra <cat@gensokyo.uk>2026-01-03 15:29:58 +0900
commitce249d23f1e3d3d90330fd8d02699b4b7c8ccb9b (patch)
tree570e686dbbb73180debe99a796bfd1be3fc71c92 /internal/pkg/pkg_test.go
parentdd5d792d14799148cd6ac56cd24a2a4af6d0f5a6 (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.go5
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) {