datamaintain
datamaintain copied to clipboard
refactor: #195 verbose and porcelain are a cli feature and not in core
Verbose and trace (verbose ++) are a logger level, now every class can use it. Some log are modify, like normal mode print less (no config, summary print only executed script, …), driver print, trace can print shell command used for mongo cli and stdout of the command, …
porcelain is managed by cli module and not by core and other modules
Resolve #195
Agree, i will move -v and -vv as a global config in this PR.
Unit Test Results
60 files - 1 60 suites - 1 3m 43s :stopwatch: +46s 229 tests ±0 229 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0 306 runs ±0 306 :heavy_check_mark: ±0 0 :zzz: ±0 0 :x: ±0
Results for commit a39846ad. ± Comparison against base commit 9e943127.
This pull request removes 11 and adds 11 tests. Note that renamed tests count towards both.
datamaintain.cli.app.PrintConfigTest ‑ should print config when command is mark-script-as-exectued()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should display relative paths when porcelain is true()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should not display relative paths when porcelain is false()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should print only summary if neither verbose nor porcelain are set()
datamaintain.core.script.FileScriptTest ‑ should compute the porcelainName when porcelain is set to true()
datamaintain.core.script.FileScriptTest ‑ should not compute the porcelainName when porcelain is set to false()
datamaintain.core.step.ScannerTest ‑ should collect script porcelain names()
datamaintain.core.step.ScannerTest$PorcelainNameComputation ‑ should compute porcelainName when porcelain is set to true()
datamaintain.core.step.ScannerTest$PorcelainNameComputation ‑ should not compute porcelainName when porcelain is set to false()
datamaintain.core.util.PorcelainUtilTest ‑ should_extract_relative_path()
…
datamaintain.cli.app.PrintConfigTest ‑ should print config when command is mark-script-as-executed()
datamaintain.cli.app.update.db.MarkOneScriptAsExecutedTest$ConfigurationBuild$GenericConfiguration$Verbose ‑ should build config with trace set to true even if verbose is set()
datamaintain.cli.app.update.db.MarkOneScriptAsExecutedTest$ConfigurationBuild$GenericConfiguration$Verbose ‑ should build config with trace set to true()
datamaintain.cli.app.update.db.UpdateDbTest$ConfigurationBuild$GenericConfiguration$Verbose ‑ should build config with trace set to true even if verbose is set()
datamaintain.cli.app.update.db.UpdateDbTest$ConfigurationBuild$GenericConfiguration$Verbose ‑ should build config with trace set to true()
datamaintain.cli.app.utils.PorcelainUtilTest ‑ should_extract_relative_path()
datamaintain.cli.app.utils.PorcelainUtilTest ‑ should_extract_relative_path_without_start_slash()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should print only summary on debug()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should print only summary on trace()
datamaintain.core.report.ReportTest$ExecuteLogs ‑ should print only summary()
…