diff --git a/src/jormungandr/jormungandr/src/context/mod.rs b/src/jormungandr/jormungandr/src/context/mod.rs index 824d76e2de..fc117c2776 100644 --- a/src/jormungandr/jormungandr/src/context/mod.rs +++ b/src/jormungandr/jormungandr/src/context/mod.rs @@ -160,4 +160,6 @@ pub struct FullContext { pub leadership_logs: LeadershipLogs, pub enclave: Enclave, pub network_state: NetworkStateR, + #[cfg(feature = "prometheus-metrics")] + pub prometheus: Option>, } diff --git a/src/jormungandr/jormungandr/src/lib.rs b/src/jormungandr/jormungandr/src/lib.rs index f97f02e014..75d0cfe537 100644 --- a/src/jormungandr/jormungandr/src/lib.rs +++ b/src/jormungandr/jormungandr/src/lib.rs @@ -315,6 +315,8 @@ fn start_services(bootstrapped_node: BootstrappedNode) -> Result<(), start_up::E leadership_logs, enclave, network_state, + #[cfg(feature = "prometheus-metrics")] + prometheus: prometheus_metric, }; block_on(async { let mut context = context.write().await; diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/from_bytes.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/from_bytes.rs index c618473459..a3861609d7 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/from_bytes.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/from_bytes.rs @@ -61,6 +61,6 @@ pub fn test_from_bytes_for_unknown_key() { jcli.key().convert_from_bytes_string_expect_fail( "ed25519-exten", byte_key_file.path(), - "'ed25519-exten' isn't a valid value for '--type '", + "invalid value 'ed25519-exten' for '--type '", ); } diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/generate.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/generate.rs index f70cefe76a..de4e333f8a 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/generate.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/key/generate.rs @@ -38,10 +38,8 @@ pub fn test_sumed25519_12_key_generation() { #[test] pub fn test_unknown_key_type_generation() { let jcli: JCli = Default::default(); - jcli.key().generate_expect_fail( - "unknown", - "'unknown' isn't a valid value for '--type '", - ); + jcli.key() + .generate_expect_fail("unknown", "invalid value 'unknown' for '--type '"); } #[test] diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/rest/host.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/rest/host.rs index 92b4fcfda8..b97dd35c38 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/rest/host.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/rest/host.rs @@ -8,7 +8,7 @@ pub fn test_correct_error_is_returned_for_incorrect_host_syntax() { jcli.rest().v0().tip_expect_fail( incorrect_host, - "Invalid value 'not_a_correct_syntax' for '--host ': relative URL without a base", + "invalid value 'not_a_correct_syntax' for '--host ': relative URL without a base", ); } diff --git a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/transaction/input.rs b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/transaction/input.rs index 997ebec5e5..25828c183b 100644 --- a/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/transaction/input.rs +++ b/src/jormungandr/testing/jormungandr-integration-tests/src/jcli/transaction/input.rs @@ -13,26 +13,33 @@ const FAKE_GENESIS_HASH: &str = "19c9852ca0a68f15d0f7de5d1a26acd67a3a3251640c606 #[test] pub fn test_cannot_create_input_with_negative_amount() { let jcli: JCli = Default::default(); + const INVALID_VALUE: &str = "-1"; + let expected_stderr_str = format!("error: unexpected argument '{}' found", INVALID_VALUE); jcli.transaction_builder(Hash::from_hex(FAKE_GENESIS_HASH).unwrap()) .new_transaction() .add_input_expect_fail( &FAKE_INPUT_TRANSACTION_ID, 0, - "-100", - "Found argument '-1' which wasn't expected", + INVALID_VALUE, + &expected_stderr_str, ); } #[test] pub fn test_cannot_create_input_with_too_big_utxo_amount() { let jcli: JCli = Default::default(); + const INVALID_VALUE: &str = "100000000000000000000"; + let expected_stderr_str = format!( + "error: invalid value '{}' for '': number too large to fit in target type", + INVALID_VALUE + ); jcli.transaction_builder(Hash::from_hex(FAKE_GENESIS_HASH).unwrap()) .new_transaction() .add_input_expect_fail( &FAKE_INPUT_TRANSACTION_ID, 0, - "100000000000000000000", - "error: Invalid value '100000000000000000000' for '': number too large to fit in target type", + INVALID_VALUE, + &expected_stderr_str, ); }