Skip to content

Commit

Permalink
adapt pipeline tests for dencun upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Pranay Valson <pranay.valson@gmail.com>
  • Loading branch information
noslav committed Mar 15, 2024
1 parent 816d291 commit 8137798
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docker-ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
password: ${{ secrets.GCR_JSON_KEY }}

- uses: actions/checkout@v2
# - uses: satackey/action-docker-layer-caching@v0.0.10
# # Ignore the failure of a step and avoid terminating the job.
# continue-on-error: true
# - uses: satackey/action-docker-layer-caching@v0.0.10
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
# - name: Build & Publish the Docker image
# run: |
# docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t us-docker.pkg.dev/covalent-project/network/refiner:latest --push
Expand Down
2 changes: 1 addition & 1 deletion mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"rustler": {:hex, :rustler, "0.31.0", "7e5eefe61e6e6f8901e5aa3de60073d360c6320d9ec363027b0197297b80c46a", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}, {:toml, "~> 0.6", [hex: :toml, repo: "hexpm", optional: false]}], "hexpm", "99e378459bfb9c3bda6d3548b2b3bc6f9ad97f728f76bdbae7bf5c770a4f8abd"},
"rustler_precompiled": {:hex, :rustler_precompiled, "0.6.3", "f838d94bc35e1844973ee7266127b156fdc962e9e8b7ff666c8fb4fed7964d23", [:mix], [{:castore, "~> 0.1 or ~> 1.0", [hex: :castore, repo: "hexpm", optional: false]}, {:rustler, "~> 0.23", [hex: :rustler, repo: "hexpm", optional: true]}], "hexpm", "e18ecca3669a7454b3a2be75ae6c3ef01d550bc9a8cf5fbddcfff843b881d7c6"},
"snappyer": {:hex, :snappyer, "1.2.8", "201ce9067a33c71a6a5087c0c3a49a010b17112d461e6df696c722dcb6d0934a", [:rebar3], [], "hexpm", "35518e79a28548b56d8fd6aee2f565f12f51c2d3d053f9cfa817c83be88c4f3d"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"},
"ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"},
"telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"},
"telemetry_metrics": {:hex, :telemetry_metrics, "0.3.1", "799e7a3e40ebe740df265346dd1f5ff3e3c3e285f1436cd51fc8ac3b2bb7a772", [:mix], [{:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "2a1e01e752d9fd2afa70c8de4b0309535d8071a34ae329e4d68980a9bd694bfa"},
"telemetry_metrics_prometheus": {:hex, :telemetry_metrics_prometheus, "0.3.1", "ee4304aafb8fa34bc54186707b0f882030b762d4a8d393af1eccd12c2eca104b", [:mix], [{:plug_cowboy, "~> 2.1", [hex: :plug_cowboy, repo: "hexpm", optional: false]}, {:telemetry_metrics_prometheus_core, "~> 0.2", [hex: :telemetry_metrics_prometheus_core, repo: "hexpm", optional: false]}], "hexpm", "e067bd280ae8d5ce82cc02515c5a6e201a7dd7939542a409d9ed63fb3d60f10c"},
Expand Down
14 changes: 7 additions & 7 deletions test/pipeline_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ defmodule Refiner.PipelineTest do
test "returns the cid and hash of the processed block hash", %{} do
# encoded specimen file: test-data/codec-0.36/encoded/1-19434485-replica-0x5800aab40ca1c9aedae3329ad82ad051099edaa293d68504b987a12acfa7b799 (codec-0.36)
test_urls = ["ipfs://bafybeich2doxzqmls5hrrdb4v4fibxqjqnhcvguamp5lmvyg45h2gz5xkm"]
expected_block_result_cid = "bafybeieexakgvuk5mg7zxyat7skwc27siabcfgksofp6ovhzu7j5inkq5y"
expected_block_result_cid = "bafybeib3xkzaxuldyiyadngetbd622wmj4zegwcnd4pl4unslqurxa4xi4"
test_block_specimen_hash = "3cf79c299079befbbf7852364921455e75d6b73cef1b559f6791fd0490160836"
test_bsp_key = "1_1_1_" <> test_block_specimen_hash

expected_block_result_hash =
<<105, 50, 175, 90, 71, 36, 11, 89, 40, 141, 86, 97, 77, 37, 70, 218, 93, 72, 45, 15, 41,
190, 77, 26, 60, 229, 65, 201, 154, 114, 47, 253>>
<<75, 182, 220, 247, 103, 1, 28, 138, 198, 79, 120, 116, 0, 120, 220, 176, 217, 166, 128,
117, 26, 7, 3, 9, 87, 65, 143, 138, 182, 197, 214, 25>>

{status, cid, block_result_hash} = Refiner.Pipeline.process_specimen(test_bsp_key, test_urls)

Expand All @@ -21,7 +21,7 @@ defmodule Refiner.PipelineTest do

test "pipeline spawner starts pipeline processes", %{} do
# encoded specimen file: test-data/codec-0.36/encoded/1-19434555-replica-0x3e6af5a88c6205e03364e4a8e4d6d558d53bbea0ed9398df0ee078e6bce3086e (codec-0.36)
test_urls = ["ipfs://bafybeihfjhxfr3r2ti7phs7gzwbx5oimzf6ainhccrk2hlzoozcmcsu36q"]
test_urls = ["ipfs://bafybeiaroqslztoplmyyaduz2kfhfmqdeybkfx7sojbisj2rsoryvmmu3y"]
test_block_specimen_hash = "e8da96c1936beca082677f0a634f659970f1646b3a6ca2d555f038aeb076e006"
test_bsp_key = "1_1_1_" <> test_block_specimen_hash
{:ok, task} = Refiner.Pipeline.Spawner.push_hash(test_bsp_key, test_urls, true)
Expand All @@ -34,11 +34,11 @@ defmodule Refiner.PipelineTest do
30_000 -> assert(false)
end

expected_block_result_cid = "bafybeifkk56vhaiqwfijernkd3blthcavol6dmwgcfm2g3op6wmw3obiy4"
expected_block_result_cid = "bafybeicpsrm3h5g6st6k2vi5awwu55wzdtvgmailpod2e53leexsk2ptcy"

expected_block_result_hash =
<<125, 209, 148, 90, 204, 95, 113, 187, 206, 110, 137, 86, 41, 90, 1, 140, 224, 3, 206, 72,
126, 126, 247, 116, 234, 15, 9, 93, 220, 190, 153, 210>>
<<48, 29, 244, 136, 156, 152, 111, 196, 64, 170, 248, 64, 226, 153, 56, 140, 31, 209, 169,
224, 185, 27, 214, 237, 245, 92, 137, 197, 127, 183, 104, 187>>

assert status == :ok
assert cid == expected_block_result_cid
Expand Down

0 comments on commit 8137798

Please sign in to comment.