forked from rosa/hakurei
internal/rosa: read-only access to built-ins
This removes potential footguns caused by mutable builtins without requiring unnecessary clones. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -21,13 +21,12 @@ import (
|
||||
func TestInfo(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
_t := rosa.Native().Std()
|
||||
qemuMeta, _ := _t.Load(rosa.H("qemu"))
|
||||
glibMeta, _ := _t.Load(rosa.H("glib"))
|
||||
zlibMeta, zlib := _t.Load(rosa.H("zlib"))
|
||||
zstdMeta, _ := _t.Load(rosa.H("zstd"))
|
||||
hakureiMeta, _ := _t.Load(rosa.H("hakurei"))
|
||||
hakureiDistMeta, _ := _t.Load(rosa.H("hakurei-dist"))
|
||||
qemuMeta, _ := rosa.MustLoad(rosa.H("qemu"))
|
||||
glibMeta, _ := rosa.MustLoad(rosa.H("glib"))
|
||||
zlibMeta, zlib := rosa.MustLoad(rosa.H("zlib"))
|
||||
zstdMeta, _ := rosa.MustLoad(rosa.H("zstd"))
|
||||
hakureiMeta, _ := rosa.MustLoad(rosa.H("hakurei"))
|
||||
hakureiDistMeta, _ := rosa.MustLoad(rosa.H("hakurei-dist"))
|
||||
|
||||
testCases := []struct {
|
||||
name string
|
||||
@@ -140,7 +139,7 @@ status : not in report
|
||||
|
||||
if tc.status != nil {
|
||||
for name, status := range tc.status {
|
||||
_, a := _t.Load(rosa.ArtifactH(unique.Make(name)))
|
||||
_, a := rosa.Load(rosa.ArtifactH(unique.Make(name)))
|
||||
if a == nil {
|
||||
t.Fatalf("invalid name %q", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user