mainmatter/rust-telemetry-workshop

The steps described in the `Getting Started` section are not detailed and accurate enough.

Closed this issue · 1 comments

I get started the workshop with the steps described in the Getting Started section, but I met the following error, I don't know how to fix these errors:

# root @ localhost in /home/jpf/github/rust-telemetry-workshop on git:my-solution x [12:19:17]                                         
$ wr                                                                                                                                            
                                                                                                                                                
                                                                                                                                                
Running tests...                                                                                                                                
                                                                                                                                                
        ✅ (00) intro - (00) welcome (Skipped)                                                                                                  ]
        ❌ (01) structured_logging - (00) intro                                                                                                 ]
                                                                                                                                               ]
        Meditate on your approach and return. Mountains are merely mountains.                                                                   
                                                                                                                                                
                                                                                                                                                
                                                                                                                                                
error: test failed, to rerun pass `--bin intro`                                                                                                 
                                                                                                                                                
running 3 tests                                                                                                                                 
FFF                                                                                                                                             
failures:
---- tests::one_arg stdout ----                                                                                                                 
thread 'tests::one_arg' panicked at exercises/01_structured_logging/00_intro/src/main.rs:84:9:                                                  
assertion `left == right` failed                                                                                                                
  left: ""
 right: "Retrieving first argument\nRetrieving second argument\n"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::happy_case stdout ----
thread 'tests::happy_case' panicked at exercises/01_structured_logging/00_intro/src/main.rs:69:9:
assertion `left == right` failed
  left: "hello world\n"
 right: "Retrieving first argument\nRetrieving second argument\nhello world\n"

---- tests::no_arg stdout ----
thread 'tests::no_arg' panicked at exercises/01_structured_logging/00_intro/src/main.rs:105:9:
assertion `left == right` failed
  left: ""
 right: "Retrieving first argument\n"


failures:
    tests::happy_case
    tests::no_arg
    tests::one_arg

test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

You're supposed to open the corresponding exercise file (

) and follow the instructions there.
Tests should never be edited: you always work on the non-test code.

99% of the time you need to add new code where you find a todo!() invocation or a // TODO comment.

There is also a solutions branch you can refer to.