summaryrefslogtreecommitdiffstats
path: root/tests/testsuite/jobs.rs
diff options
context:
space:
mode:
authorNeil Kistner <neil.kistner@gmail.com>2019-09-09 18:14:38 -0500
committerMatan Kushner <hello@matchai.me>2019-09-09 19:14:38 -0400
commit9f70ffb7a7d2eeef64c360c553e909d38e44adf0 (patch)
tree4dccf8a935e027dcf7bc77781eed1554a645d72a /tests/testsuite/jobs.rs
parentdc8409333e194624896c74c5e5cdb4f664f53f9d (diff)
fix: Lazy load git repo and only run module if not disabled (#306)
A couple of optimizations are done in this PR. One, we now will check config ahead of time to see if a module is disabled before running any module code. Also, we won't try to discover a git repository unless the module requests access to it.
Diffstat (limited to 'tests/testsuite/jobs.rs')
-rw-r--r--tests/testsuite/jobs.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/testsuite/jobs.rs b/tests/testsuite/jobs.rs
index b69e38035..cfdd1e9da 100644
--- a/tests/testsuite/jobs.rs
+++ b/tests/testsuite/jobs.rs
@@ -64,19 +64,3 @@ fn config_2_job_3() -> io::Result<()> {
assert_eq!(expected, actual);
Ok(())
}
-
-#[test]
-fn config_disabled() -> io::Result<()> {
- let output = common::render_module("jobs")
- .use_config(toml::toml! {
- [jobs]
- disabled = true
- })
- .arg("--jobs=1")
- .output()?;
- let actual = String::from_utf8(output.stdout).unwrap();
-
- let expected = "";
- assert_eq!(expected, actual);
- Ok(())
-}