CeresDB / sqlness

An ergonomic, opinionated framework for SQL integration test.
https://crates.io/crates/sqlness
Apache License 2.0
22 stars 7 forks source link

Refactor UI to use structured output util #40

Open waynexia opened 1 year ago

waynexia commented 1 year ago

Describe This Problem

Currently sqlness outputs everything with println!. This is hard to maintain.

Proposal

Consider a structured way to organize our outputs. Either using existing util like TestReporter from nextest or wrap our own.

Additional Context

No response

jiacai2050 commented 1 year ago

Any user case to collect stdout output?

waynexia commented 1 year ago

Any user case to collect stdout output?

No for now, just for refactoring

jiacai2050 commented 1 year ago

Then I suggest we could define a trait to collect those info

trait Collector {
  fn append(&self, &str) -> Result<()>
  fn flush(&self) -> Result<()>
}
waynexia commented 1 year ago

Not sure if these are enough. This collector may also be exposed to users to replace their println in their sqlness runner