Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests completed successfully without proper configuration #746

Closed
Neurone opened this issue Dec 7, 2023 · 2 comments · Fixed by #753
Closed

Tests completed successfully without proper configuration #746

Neurone opened this issue Dec 7, 2023 · 2 comments · Fixed by #753
Labels
bug Something isn't working

Comments

@Neurone
Copy link
Contributor

Neurone commented Dec 7, 2023

Description

I set this as a bug because it's an unexpected behavior.

I'm able to complete all the tests without errors, even if I run those without a proper environment configuration - that is, I'm simply not following the instruction about setting all the TEST_* env variables, I just clone and run the tests.

❯ cargo test
warning: `&` without an explicit lifetime name cannot be used here
  --> src/ledger_id.rs:30:31
   |
30 |     pub(crate) const MAINNET: &Self = Self::new(&[0]);
   |                               ^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
note: the lint level is defined here
  --> src/lib.rs:28:5
   |
28 |     future_incompatible,
   |     ^^^^^^^^^^^^^^^^^^^
   = note: `#[warn(elided_lifetimes_in_associated_constant)]` implied by `#[warn(future_incompatible)]`
help: use the `'static` lifetime
   |
30 |     pub(crate) const MAINNET: &'static Self = Self::new(&[0]);
   |                                +++++++

warning: `&` without an explicit lifetime name cannot be used here
  --> src/ledger_id.rs:31:31
   |
31 |     pub(crate) const TESTNET: &Self = Self::new(&[1]);
   |                               ^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
help: use the `'static` lifetime
   |
31 |     pub(crate) const TESTNET: &'static Self = Self::new(&[1]);
   |                                +++++++

warning: `&` without an explicit lifetime name cannot be used here
  --> src/ledger_id.rs:32:34
   |
32 |     pub(crate) const PREVIEWNET: &Self = Self::new(&[2]);
   |                                  ^
   |
   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
help: use the `'static` lifetime
   |
32 |     pub(crate) const PREVIEWNET: &'static Self = Self::new(&[2]);
   |                                   +++++++

warning: `hedera` (lib) generated 3 warnings (run `cargo fix --lib -p hedera` to apply 3 suggestions)
warning: `hedera` (lib test) generated 3 warnings (3 duplicates)
    Finished test [unoptimized + debuginfo] target(s) in 0.07s
     Running unittests src/lib.rs (target/debug/deps/hedera-b2a9b842a228b07a)

running 735 tests
[...]

test result: ok. 735 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.14s

     Running tests/e2e/main.rs (target/debug/deps/e2e-dd223305682e6984)

running 219 tests
[...]

test result: ok. 215 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out; finished in 0.51s

   Doc-tests hedera

running 15 tests
[...]

test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 5.90s

Steps to reproduce

  1. clone the repo with --recursive option
  2. run cargo test
  3. all tests pass

Additional context

No response

Hedera network

other

Version

0.23.0

Operating system

None

@Neurone Neurone added the bug Something isn't working label Dec 7, 2023
@Neurone
Copy link
Contributor Author

Neurone commented Dec 7, 2023

I just discovered a bug related to this. I sent a couple of PRs (#747, #750) to update the code and the docs.

@RickyLB
Copy link
Contributor

RickyLB commented Dec 7, 2023

@Neurone Thanks for catching these inconsistencies. Will give this a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants