...
1load("@aspect_bazel_lib//lib:write_source_files.bzl", "write_source_files")
2load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
3load("//test/snapshot:snapshot.bzl", "generate_snapshots")
4
5go_library(
6 name = "resolve",
7 srcs = [
8 "options.go",
9 "resolve.go",
10 ],
11 importpath = "edge-infra.dev/pkg/f8n/warehouse/pallet/resolve",
12 visibility = ["//visibility:public"],
13 deps = [
14 "//pkg/f8n/warehouse/oci",
15 "//pkg/f8n/warehouse/oci/walk",
16 "//pkg/f8n/warehouse/pallet",
17 "@com_github_google_go_containerregistry//pkg/name",
18 "@com_github_google_go_containerregistry//pkg/v1:pkg",
19 "@com_github_google_go_containerregistry//pkg/v1/remote",
20 ],
21)
22
23go_test(
24 name = "resolve_test",
25 srcs = ["resolve_test.go"],
26 data = glob(["testdata/**"]),
27 embed = [":resolve"],
28 deps = [
29 "//pkg/f8n/warehouse/oci",
30 "//pkg/f8n/warehouse/oci/mutate",
31 "//pkg/f8n/warehouse/whtest/registry",
32 "//test/fixtures",
33 "//test/snapshot",
34 "@com_github_google_go_containerregistry//pkg/name",
35 "@com_github_google_go_containerregistry//pkg/v1:pkg",
36 "@com_github_stretchr_testify//assert",
37 "@com_github_stretchr_testify//require",
38 ],
39)
40
41generate_snapshots(
42 name = "resolve_snapshots",
43 testonly = True,
44 srcs = glob(["testdata/**"]),
45 snapshot_path = "pkg/f8n/warehouse/pallet/resolve/testdata/snapshots",
46 snapshot_test = ":resolve_test",
47)
48
49write_source_files(
50 name = "update_snapshots_resolve",
51 testonly = True,
52 files = {
53 "testdata/snapshots": ":resolve_snapshots",
54 },
55)
View as plain text