Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsemakula committed Feb 4, 2025
1 parent 90ae237 commit 2aaf6ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use contract_build::{
BuildArtifacts,
BuildMode,
Features,
MetadataSpec,
Network,
OutputType,
UnstableFlags,
Expand All @@ -34,6 +35,7 @@ let args = contract_build::ExecuteArgs {
output_type: OutputType::Json,
skip_clippy_and_linting: false,
image: ImageVariant::Default,
metadata_spec: MetadataSpec::Ink,
};

contract_build::execute(args);
Expand Down
2 changes: 2 additions & 0 deletions crates/build/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,11 @@ impl Features {
serde::Serialize,
serde::Deserialize,
)]
#[serde(rename_all = "lowercase")]
pub enum MetadataSpec {
/// ink!
#[clap(name = "ink")]
#[serde(rename = "ink!")]
#[default]
Ink,
/// Solidity
Expand Down
2 changes: 2 additions & 0 deletions crates/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,7 @@ mod unit_tests {
let raw_result = r#"{
"dest_binary": "/path/to/contract.polkavm",
"metadata_result": {
"spec": "ink!",
"dest_metadata": "/path/to/contract.json",
"dest_bundle": "/path/to/contract.contract"
},
Expand All @@ -1085,6 +1086,7 @@ mod unit_tests {
let build_result = BuildResult {
dest_binary: Some(PathBuf::from("/path/to/contract.polkavm")),
metadata_result: Some(MetadataArtifacts {
spec: MetadataSpec::Ink,
dest_metadata: PathBuf::from("/path/to/contract.json"),
dest_bundle: PathBuf::from("/path/to/contract.contract"),
}),
Expand Down

0 comments on commit 2aaf6ad

Please sign in to comment.