Skip to content

Commit

Permalink
tremor-cli/test: Refactor large parts of the test code.
Browse files Browse the repository at this point in the history
This gets rid of one of the long functions mentioned in #20, makes the code more
readable, and (in the future) easier to test properly.

Signed-off-by: Mordecai Malignatus <mordecai@malignat.us>
  • Loading branch information
MordecaiMalignatus committed Oct 28, 2021
1 parent 22b8568 commit 959afe4
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 217 deletions.
3 changes: 3 additions & 0 deletions tremor-cli/src/cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,12 @@ subcommands:
about: One of `all`, `api`, `bench`, `command`, `integration`, `rest`, or `unit`
takes_value: true
default_value: "all"
index: 1
- PATH:
about: The root test path
takes_value: true
default_value: "tests"
index: 2
- REPORT:
about: Should generate a test report to specified path
short: o
Expand Down
3 changes: 2 additions & 1 deletion tremor-cli/src/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use crate::test::kind::Kind;
use crate::test::stats;
use std::collections::HashMap;

Expand All @@ -24,7 +25,7 @@ pub(crate) struct TestRun {
pub(crate) includes: Vec<String>,
pub(crate) excludes: Vec<String>,
pub(crate) reports: HashMap<String, Vec<TestReport>>,
pub(crate) stats: HashMap<String, stats::Stats>,
pub(crate) stats: HashMap<Kind, stats::Stats>,
}

/// A test report is the collection of test suites that
Expand Down
Loading

0 comments on commit 959afe4

Please sign in to comment.