osbase/oci: add end-to-end tests
This adds some end-to-end tests of the OCI OS image generation and
consumption implementations.
Change-Id: Id9f4e3ab5b2c959807657e06990525810d4979ff
Reviewed-on: https://review.monogon.dev/c/monogon/+/4092
Reviewed-by: Tim Windelschmidt <tim@monogon.tech>
Tested-by: Jenkins CI
diff --git a/osbase/oci/registry/BUILD.bazel b/osbase/oci/registry/BUILD.bazel
index ca2d806..cbe81b0 100644
--- a/osbase/oci/registry/BUILD.bazel
+++ b/osbase/oci/registry/BUILD.bazel
@@ -20,6 +20,20 @@
go_test(
name = "registry_test",
- srcs = ["headers_test.go"],
+ srcs = [
+ "client_test.go",
+ "headers_test.go",
+ ],
+ data = [
+ "//osbase/oci/osimage:test_image_uncompressed",
+ ],
embed = [":registry"],
+ x_defs = {
+ "xImagePath": "$(rlocationpath //osbase/oci/osimage:test_image_uncompressed )",
+ },
+ deps = [
+ "//osbase/oci",
+ "@com_github_cenkalti_backoff_v4//:backoff",
+ "@io_bazel_rules_go//go/runfiles",
+ ],
)