Skip to content
Snippets Groups Projects
Unverified Commit 2ef27231 authored by Michal Kucharczyk's avatar Michal Kucharczyk Committed by GitHub
Browse files

chain-spec-guide-runtime: path to wasm blob fixed (#6673)


In `chain-spec-guide-runtime` crate's tests, there was assumption that
release version of wasm blob exists. This PR uses
`chain_spec_guide_runtime::runtime::WASM_BINARY_PATH` const to use
correct path to runtime blob.

---------

Co-authored-by: default avatarGitHub Action <action@github.com>
parent afd065fa
No related merge requests found
Pipeline #507315 waiting for manual action with stages
in 1 hour, 9 minutes, and 54 seconds
use serde_json::{json, Value};
use std::{process::Command, str};
const WASM_FILE_PATH: &str =
"../../../../../target/release/wbuild/chain-spec-guide-runtime/chain_spec_guide_runtime.wasm";
fn wasm_file_path() -> &'static str {
chain_spec_guide_runtime::runtime::WASM_BINARY_PATH
.expect("chain_spec_guide_runtime wasm should exist. qed")
}
const CHAIN_SPEC_BUILDER_PATH: &str = "../../../../../target/release/chain-spec-builder";
......@@ -26,7 +28,7 @@ fn list_presets() {
let output = Command::new(get_chain_spec_builder_path())
.arg("list-presets")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.output()
.expect("Failed to execute command");
......@@ -50,7 +52,7 @@ fn get_preset() {
let output = Command::new(get_chain_spec_builder_path())
.arg("display-preset")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("-p")
.arg("preset_2")
.output()
......@@ -83,7 +85,7 @@ fn generate_chain_spec() {
.arg("/dev/stdout")
.arg("create")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
......@@ -140,7 +142,7 @@ fn generate_para_chain_spec() {
.arg("-p")
.arg("1000")
.arg("-r")
.arg(WASM_FILE_PATH)
.arg(wasm_file_path())
.arg("named-preset")
.arg("preset_2")
.output()
......
title: 'chain-spec-guide-runtime: path to wasm blob fixed'
doc:
- audience: Runtime Dev
description: In `chain-spec-guide-runtime` crate's tests, there was assumption that
release version of wasm blob exists. This PR uses `chain_spec_guide_runtime::runtime::WASM_BINARY_PATH`
const to use correct path to runtime blob.
crates: []
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment