trying coveralls coverage reporting

This commit is contained in:
epi
2020-10-09 14:17:13 -05:00
parent 2751bb844a
commit 109d38f2ea
4 changed files with 20 additions and 4 deletions

1
.coveralls.yml Normal file
View File

@@ -0,0 +1 @@
repo_token: XyxRoyl77LZBeMVFP8GiM78qOqtXnQlXb

View File

@@ -34,3 +34,8 @@ jobs:
file: ./coverage.xml
name: codecov-umbrella
fail_ci_if_error: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov.info

View File

@@ -21,7 +21,11 @@ const UUID_LENGTH: u64 = 32;
/// configuration and any static wildcard lengths.
#[derive(Default, Debug)]
pub struct WildcardFilter {
/// size of the response that will later be combined with the length of the path of the url
/// requested
pub dynamic: u64,
/// size of the response that should be included with filters passed via runtime configuration
pub size: u64,
}
@@ -280,9 +284,17 @@ mod tests {
#[test]
/// request a unique string of 32bytes * a value returns correct result
fn unique_string_returns_correct_length() {
fn heuristics_unique_string_returns_correct_length() {
for i in 0..10 {
assert_eq!(unique_string(i).len(), i * 32);
}
}
#[test]
/// simply test the default values for wildcardfilter, expect 0, 0
fn heuristics_wildcardfilter_dafaults() {
let wcf = WildcardFilter::default();
assert_eq!(wcf.size, 0);
assert_eq!(wcf.dynamic, 0);
}
}

View File

@@ -520,9 +520,7 @@ pub async fn scan_url(target_url: &str, wordlist: Arc<HashSet<String>>, base_dep
);
let filter = match heuristics::wildcard_test(&target_url, wildcard_bar).await {
Some(f) => {
Arc::new(f)
}
Some(f) => Arc::new(f),
None => Arc::new(WildcardFilter::default()),
};