diff --git a/CHANGELOG.md b/CHANGELOG.md index d1297a1b950..7380a84942a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed +- Restrict syntax for setting default ink! e2e test runtime-only emulator - [#2143](https://github.com/paritytech/ink/pull/2143) + ## Version 5.0.0-rc.2 ### Added diff --git a/crates/e2e/macro/src/config.rs b/crates/e2e/macro/src/config.rs index aaec35b4b4e..b5d561c3480 100644 --- a/crates/e2e/macro/src/config.rs +++ b/crates/e2e/macro/src/config.rs @@ -66,6 +66,7 @@ impl Node { #[derive(Clone, Eq, PartialEq, Debug, darling::FromMeta)] pub enum RuntimeOnly { #[darling(word)] + #[darling(skip)] Default, Runtime(syn::Path), } @@ -134,6 +135,18 @@ mod tests { assert_eq!(config.backend(), Backend::RuntimeOnly(RuntimeOnly::Default)); } + #[test] + #[should_panic(expected = "ErrorUnknownField")] + fn config_works_backend_runtime_only_default_not_allowed() { + let input = quote! { + backend(runtime_only(default)), + }; + let config = + E2EConfig::from_list(&NestedMeta::parse_meta_list(input).unwrap()).unwrap(); + + assert_eq!(config.backend(), Backend::RuntimeOnly(RuntimeOnly::Default)); + } + #[test] fn config_works_runtime_only_with_custom_backend() { let input = quote! {