Skip to content

Commit

Permalink
Add automated tests for S3 and GCS
Browse files Browse the repository at this point in the history
  • Loading branch information
malt3 committed Dec 11, 2024
1 parent ad5adf7 commit f0eb65a
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
20 changes: 20 additions & 0 deletions examples/full/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,23 @@ sh_test(
],
data = ["@private_github_repo_file//file"],
)

sh_test(
name = "check_s3",
srcs = ["@tweag-credential-helper//examples/testing:check_file_hash.sh"],
args = [
"$(location @hello_world_s3//file)",
"3cf3250d34148d3fe03c4a8eb1a38695b969ff96ec6bfce5f9f544279fb2a5df",
],
data = ["@hello_world_s3//file"],
)

sh_test(
name = "check_gcs",
srcs = ["@tweag-credential-helper//examples/testing:check_file_hash.sh"],
args = [
"$(location @hello_world_gcs//file)",
"fcb96ae418b863eb93883a94cc39f81545cfdf97e20d292ed1bd8f78a153cedc",
],
data = ["@hello_world_gcs//file"],
)
25 changes: 12 additions & 13 deletions examples/full/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ http_file(
urls = ["https://raw.githubusercontent.com/tweag/credential-helper-private/606312d9f8467ed4368cf8b126b95c161ba5de28/hello.txt"],
)

http_file(
name = "hello_world_s3",
integrity = "sha256-PPMlDTQUjT/gPEqOsaOGlblp/5bsa/zl+fVEJ5+ypd8=",
urls = ["https://malte-s3-bazel-test.s3.amazonaws.com/hello_world"],
)

http_file(
name = "hello_world_gcs",
integrity = "sha256-/Llq5Bi4Y+uTiDqUzDn4FUXP35fiDSku0b2PeKFTztw=",
urls = ["https://storage.googleapis.com/rules_gcs/hello_world"],
)

# temporarily removed until CI has required access
# http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

Expand All @@ -30,16 +42,3 @@ http_file(
# strip_prefix = "credential-helper-private-0.0.1",
# urls = ["https://github.com/tweag/credential-helper-private/archive/refs/tags/v0.0.1.tar.gz"],
# )

#
# http_file(
# name = "hello_world_s3",
# integrity = "sha256-N5gMM5Ud5rDkUMNwGyGb/u6TBURwX2N80RWLY4J7s5A=",
# urls = ["https://malte-s3-bazel-test.s3.amazonaws.com/hello_world"],
# )
#
# http_file(
# name = "hello_world_gcs",
# integrity = "sha256-N5gMM5Ud5rDkUMNwGyGb/u6TBURwX2N80RWLY4J7s5A=",
# urls = ["https://storage.googleapis.com/rules_gcs/hello_world"],
# )

0 comments on commit f0eb65a

Please sign in to comment.