From d54510ee4132d42ad4d33ee6eadfc970430a5f65 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:05:33 +0100
Subject: [PATCH 001/148] Bump step-security/harden-runner from 2.5.1 to 2.6.0
(#569)
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.5.1 to 2.6.0.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/8ca2b8b2ece13480cda6dacd3511b49857a23c09...1b05615854632b887b69ae1be8cbefe72d3ae423)
---
updated-dependencies:
- dependency-name: step-security/harden-runner
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/mutation.yml | 4 ++--
.github/workflows/reindex.yml | 2 +-
.github/workflows/release.yml | 2 +-
.github/workflows/scorecards.yml | 2 +-
.github/workflows/sonar.yml | 2 +-
.github/workflows/test.yml | 4 ++--
7 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 840c101148..f8d1215264 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -29,7 +29,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml
index c53524758b..2ed182d84b 100644
--- a/.github/workflows/mutation.yml
+++ b/.github/workflows/mutation.yml
@@ -17,7 +17,7 @@ jobs:
LANG: en_GB
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
@@ -62,7 +62,7 @@ jobs:
concurrency: pages_branch
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/reindex.yml b/.github/workflows/reindex.yml
index 59ae03b6ec..126b8c9bcd 100644
--- a/.github/workflows/reindex.yml
+++ b/.github/workflows/reindex.yml
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 9a8452474e..06a7ca2cb5 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 7b87a21eb2..1f993907bf 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -32,7 +32,7 @@ jobs:
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index 0fec35dd20..b824a98621 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 09f8e8ef6a..68afd875f6 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
@@ -59,7 +59,7 @@ jobs:
concurrency: pages_branch
steps:
- name: Harden Runner
- uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1
+ uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
From ceeb5f4bfbf20632e4309e7e4ab0670af558ab2d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:06:03 +0100
Subject: [PATCH 002/148] Bump @types/node from 20.8.0 to 20.8.3 in
/report/report-ng (#576)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.0 to 20.8.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index d44ebe4b29..7e00291b1b 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -37,7 +37,7 @@
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
"@types/jasmine": "~4.3.6",
- "@types/node": "^20.8.0",
+ "@types/node": "^20.8.3",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
"jasmine-core": "~5.1.1",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index df692fbac0..36a0ce37a4 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1926,10 +1926,10 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
-"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.0":
- version "20.8.0"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.0.tgz#10ddf0119cf20028781c06d7115562934e53f745"
- integrity sha512-LzcWltT83s1bthcvjBmiBvGJiiUe84NWRHkw+ZV6Fr41z2FbIzvc815dk2nQ3RAKMuN2fkenM/z3Xv2QzEpYxQ==
+"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.3":
+ version "20.8.3"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.3.tgz#c4ae2bb1cfab2999ed441a95c122bbbe1567a66d"
+ integrity sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==
"@types/parse-json@^4.0.0":
version "4.0.0"
From 8d337e0a0e4aeb55d2f474ffcfa07b6ca906779e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:07:03 +0100
Subject: [PATCH 003/148] Bump mermaid from 10.4.0 to 10.5.0 in
/report/report-ng (#572)
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.4.0 to 10.5.0.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.4.0...v10.5.0)
---
updated-dependencies:
- dependency-name: mermaid
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index 7e00291b1b..96f182284d 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -26,7 +26,7 @@
"@types/diff-match-patch": "^1.0.32",
"@types/dompurify": "^3.0.3",
"diff-match-patch": "^1.0.5",
- "mermaid": "^10.4.0",
+ "mermaid": "^10.5.0",
"ngx-markdown": "^14.0.1",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 36a0ce37a4..59182b3d27 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -5455,10 +5455,10 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
-mermaid@^10.4.0:
- version "10.4.0"
- resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.4.0.tgz#f89bf0ada161cbbe4dba2776e805119f7245a102"
- integrity sha512-4QCQLp79lvz7UZxow5HUX7uWTPJOaQBVExduo91tliXC7v78i6kssZOPHxLL+Xs30KU72cpPn3g3imw/xm/gaw==
+mermaid@^10.5.0:
+ version "10.5.0"
+ resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.5.0.tgz#e90512a65b5c6e29bd86cd04ce45aa31da2be76d"
+ integrity sha512-9l0o1uUod78D3/FVYPGSsgV+Z0tSnzLBDiC9rVzvelPxuO80HbN1oDr9ofpPETQy9XpypPQa26fr09VzEPfvWA==
dependencies:
"@braintree/sanitize-url" "^6.0.1"
"@types/d3-scale" "^4.0.3"
From f71f9ac2cf73294537dc33650d3b79ab1439525b Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:08:52 +0100
Subject: [PATCH 004/148] Bump ossf/scorecard-action from 2.2.0 to 2.3.0 (#571)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/08b4669551908b1024bb425080c797723083c031...483ef80eb98fb506c348f7d62e28055e49fe2398)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 1f993907bf..cc70c3937f 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -42,7 +42,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
+ uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
with:
results_file: results.sarif
results_format: sarif
From cd9287de2586a2d9ed3bb1971adfd1a10582252a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:09:30 +0100
Subject: [PATCH 005/148] Bump stefanzweifel/git-auto-commit-action from 4.16.0
to 5.0.0 (#570)
Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4.16.0 to 5.0.0.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/3ea6ae190baf489ba007f7c92608f33ce20ef04a...8756aa072ef5b4a080af5dc8fef36c5d586e521d)
---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/mutation.yml | 2 +-
.github/workflows/reindex.yml | 2 +-
.github/workflows/test.yml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml
index 2ed182d84b..e7044b20bb 100644
--- a/.github/workflows/mutation.yml
+++ b/.github/workflows/mutation.yml
@@ -80,6 +80,6 @@ jobs:
run: perl regen_index.pl $GITHUB_HEAD_REF >> $GITHUB_STEP_SUMMARY
- name: Commit
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
+ uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
branch: pages
diff --git a/.github/workflows/reindex.yml b/.github/workflows/reindex.yml
index 126b8c9bcd..b5bee86bd3 100644
--- a/.github/workflows/reindex.yml
+++ b/.github/workflows/reindex.yml
@@ -26,5 +26,5 @@ jobs:
run: perl regen_index.pl >> $GITHUB_STEP_SUMMARY
- name: Commit
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
+ uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 68afd875f6..505e148e74 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -84,6 +84,6 @@ jobs:
run: perl regen_index.pl $GITHUB_HEAD_REF >> $GITHUB_STEP_SUMMARY
- name: Commit
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0
+ uses: stefanzweifel/git-auto-commit-action@8756aa072ef5b4a080af5dc8fef36c5d586e521d # v5.0.0
with:
branch: pages
From 5cbf03a4327ea707aa7a212ad29435fe07af1bac Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 9 Oct 2023 08:56:21 +0100
Subject: [PATCH 006/148] Bump @types/jasmine from 4.3.6 to 5.1.0 in
/report/report-ng (#575)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 4.3.6 to 5.1.0.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)
---
updated-dependencies:
- dependency-name: "@types/jasmine"
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index 96f182284d..b200f514e7 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -36,7 +36,7 @@
"@angular-devkit/build-angular": "^14.1.2",
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
- "@types/jasmine": "~4.3.6",
+ "@types/jasmine": "~5.1.0",
"@types/node": "^20.8.3",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 59182b3d27..eefa53fc12 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1894,10 +1894,10 @@
dependencies:
"@types/node" "*"
-"@types/jasmine@~4.3.6":
- version "4.3.6"
- resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-4.3.6.tgz#d9855fa9f808138488784610f888046bb9a59aff"
- integrity sha512-3N0FpQTeiWjm+Oo1WUYWguUS7E6JLceiGTriFrG8k5PU7zRLJCzLcWURU3wjMbZGS//a2/LgjsnO3QxIlwxt9g==
+"@types/jasmine@~5.1.0":
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-5.1.0.tgz#581b2f7393942a56acd3542fe168c803d7d588d6"
+ integrity sha512-XOV0KsqXNX2gUSqk05RWeolIMgaAQ7+l/ozOBoQ8NGwLg+E7J9vgagODtNgfim4jCzEUP0oJ3gnXeC+Zv+Xi1A==
"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
version "7.0.11"
From 93db70e64fabcda6e0c6ba5726cde7d19255ef97 Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Mon, 9 Oct 2023 15:27:02 +0100
Subject: [PATCH 007/148] Diff demo (#568)
* corrected saved report source
* fixed diff display
* no need for leading wildcards
* Allowed multiple diffs
* linked to diff example
---
.github/workflows/test.yml | 2 +-
doc/src/main/markdown/further.md | 2 ++
.../src/app/change-analysis/change-analysis.component.css | 3 ++-
.../src/app/change-analysis/change-analysis.component.html | 4 ++--
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 505e148e74..b30a5a6c5a 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -42,7 +42,7 @@ jobs:
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: flow_execution_reports
- path: '**/target/mctf/latest'
+ path: 'example/**/target/mctf/latest'
- name: Save angular coverage reports
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
diff --git a/doc/src/main/markdown/further.md b/doc/src/main/markdown/further.md
index 924373376a..1a7c7d8d47 100644
--- a/doc/src/main/markdown/further.md
+++ b/doc/src/main/markdown/further.md
@@ -11,6 +11,8 @@ The [`Reporting` enum value][Reporting] that you supply controls whether the rep
By default the report will be saved to a timestamped directory under `target/mctf`, but the `mctf.report.dir` system property offers control over the destination directory.
+The execution report includes tooling to aid in change review. If the reports generated by your testing are hosted somewhere, (e.g.: by the CI server) then you can link to the model diff in review documentation, [for example](https://github.com/Mastercard/flow/pull/567).
+
[AbstractFlocessor.reporting(Reporting,String...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L194-L203,194-203
diff --git a/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.css b/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.css
index 171f77f892..484aef5dcd 100644
--- a/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.css
+++ b/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.css
@@ -9,7 +9,8 @@
.diff_display {
display: flex;
- flex-wrap: wrap
+ flex-wrap: wrap;
+ white-space: break-spaces;
}
.rem {
diff --git a/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.html b/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.html
index c1222758cb..b2226a7773 100644
--- a/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.html
+++ b/report/report-ng/projects/report/src/app/change-analysis/change-analysis.component.html
@@ -63,7 +63,7 @@ Changed {{changedFlowCount}}
-
+
@@ -123,4 +123,4 @@ Unchanged {{unchangedEntries.length}}
-
\ No newline at end of file
+
From c4072874b9f6cda438c48a86e358e179d8c90fce Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Tue, 10 Oct 2023 17:13:02 +0100
Subject: [PATCH 008/148] Perhaps it's time to stop swithering? (#577)
---
aggregator/pom.xml | 2 +-
api/pom.xml | 2 +-
assert/assert-core/pom.xml | 2 +-
assert/assert-filter/pom.xml | 2 +-
assert/assert-junit4/pom.xml | 2 +-
assert/assert-junit5/pom.xml | 2 +-
assert/pom.xml | 2 +-
bom/pom.xml | 2 +-
builder/pom.xml | 2 +-
doc/pom.xml | 2 +-
example/app-api/pom.xml | 2 +-
example/app-assert/pom.xml | 2 +-
example/app-core/pom.xml | 2 +-
example/app-framework/pom.xml | 2 +-
example/app-histogram/pom.xml | 2 +-
example/app-itest/pom.xml | 2 +-
example/app-model/pom.xml | 2 +-
example/app-queue/pom.xml | 2 +-
example/app-store/pom.xml | 2 +-
example/app-ui/pom.xml | 2 +-
example/app-web-ui/pom.xml | 2 +-
example/pom.xml | 2 +-
message/message-core/pom.xml | 2 +-
message/message-http/pom.xml | 2 +-
message/message-json/pom.xml | 2 +-
message/message-sql/pom.xml | 2 +-
message/message-text/pom.xml | 2 +-
message/message-web/pom.xml | 2 +-
message/message-xml/pom.xml | 2 +-
message/pom.xml | 2 +-
model/pom.xml | 2 +-
pom.xml | 2 +-
report/pom.xml | 2 +-
report/report-core/pom.xml | 2 +-
report/report-ng/pom.xml | 2 +-
validation/coppice/pom.xml | 2 +-
validation/pom.xml | 2 +-
validation/validation-core/pom.xml | 2 +-
validation/validation-junit4/pom.xml | 2 +-
validation/validation-junit5/pom.xml | 2 +-
40 files changed, 40 insertions(+), 40 deletions(-)
diff --git a/aggregator/pom.xml b/aggregator/pom.xml
index 81a9434018..360c9398a7 100644
--- a/aggregator/pom.xml
+++ b/aggregator/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
aggregator
jar
diff --git a/api/pom.xml b/api/pom.xml
index 486ab7a0da..49d402630e 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
api
jar
diff --git a/assert/assert-core/pom.xml b/assert/assert-core/pom.xml
index 7a6fc24f92..114315ba5d 100644
--- a/assert/assert-core/pom.xml
+++ b/assert/assert-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
assert-core
jar
diff --git a/assert/assert-filter/pom.xml b/assert/assert-filter/pom.xml
index 7328772574..fde2566809 100644
--- a/assert/assert-filter/pom.xml
+++ b/assert/assert-filter/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
assert-filter
jar
diff --git a/assert/assert-junit4/pom.xml b/assert/assert-junit4/pom.xml
index f0ba5eee3c..54f536391f 100644
--- a/assert/assert-junit4/pom.xml
+++ b/assert/assert-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
assert-junit4
jar
diff --git a/assert/assert-junit5/pom.xml b/assert/assert-junit5/pom.xml
index 9d9fef107d..d84b28af27 100644
--- a/assert/assert-junit5/pom.xml
+++ b/assert/assert-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
assert-junit5
jar
diff --git a/assert/pom.xml b/assert/pom.xml
index bd8cfd65a1..fc6d2d163a 100644
--- a/assert/pom.xml
+++ b/assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
assert
pom
diff --git a/bom/pom.xml b/bom/pom.xml
index cc639433df..ac541b86ef 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
bom
pom
diff --git a/builder/pom.xml b/builder/pom.xml
index 5df91f96ed..a4850b70bb 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
builder
jar
diff --git a/doc/pom.xml b/doc/pom.xml
index b79eed2cec..f2224208e8 100644
--- a/doc/pom.xml
+++ b/doc/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
doc
jar
diff --git a/example/app-api/pom.xml b/example/app-api/pom.xml
index 137306cfbc..1d08f24771 100644
--- a/example/app-api/pom.xml
+++ b/example/app-api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-api
jar
diff --git a/example/app-assert/pom.xml b/example/app-assert/pom.xml
index 329658c0bf..cf3f4e1ad2 100644
--- a/example/app-assert/pom.xml
+++ b/example/app-assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-assert
jar
diff --git a/example/app-core/pom.xml b/example/app-core/pom.xml
index 0d6f5c5685..f39fb16ac7 100644
--- a/example/app-core/pom.xml
+++ b/example/app-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-core
jar
diff --git a/example/app-framework/pom.xml b/example/app-framework/pom.xml
index 0dc8dd26f5..5c945f94ca 100644
--- a/example/app-framework/pom.xml
+++ b/example/app-framework/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-framework
jar
diff --git a/example/app-histogram/pom.xml b/example/app-histogram/pom.xml
index b89dc5ebe5..efbc53d901 100644
--- a/example/app-histogram/pom.xml
+++ b/example/app-histogram/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-histogram
jar
diff --git a/example/app-itest/pom.xml b/example/app-itest/pom.xml
index 92fcfc5823..178c06df08 100644
--- a/example/app-itest/pom.xml
+++ b/example/app-itest/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-itest
jar
diff --git a/example/app-model/pom.xml b/example/app-model/pom.xml
index 0819fcc3f5..baae19c479 100644
--- a/example/app-model/pom.xml
+++ b/example/app-model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-model
jar
diff --git a/example/app-queue/pom.xml b/example/app-queue/pom.xml
index dd52aaa24d..7b3777c51b 100644
--- a/example/app-queue/pom.xml
+++ b/example/app-queue/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-queue
jar
diff --git a/example/app-store/pom.xml b/example/app-store/pom.xml
index a6abaf9a45..c69720da3a 100644
--- a/example/app-store/pom.xml
+++ b/example/app-store/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-store
jar
diff --git a/example/app-ui/pom.xml b/example/app-ui/pom.xml
index 251019f587..6eaf364dce 100644
--- a/example/app-ui/pom.xml
+++ b/example/app-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-ui
jar
diff --git a/example/app-web-ui/pom.xml b/example/app-web-ui/pom.xml
index 4793190818..44aa3557e6 100644
--- a/example/app-web-ui/pom.xml
+++ b/example/app-web-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
app-web-ui
jar
diff --git a/example/pom.xml b/example/pom.xml
index 10e18b187d..1bee62eaa4 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -5,7 +5,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
com.mastercard.test.flow.example
diff --git a/message/message-core/pom.xml b/message/message-core/pom.xml
index 4258d33a14..5a4a2b5d66 100644
--- a/message/message-core/pom.xml
+++ b/message/message-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-core
jar
diff --git a/message/message-http/pom.xml b/message/message-http/pom.xml
index d6ff1c901e..48809e251a 100644
--- a/message/message-http/pom.xml
+++ b/message/message-http/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-http
jar
diff --git a/message/message-json/pom.xml b/message/message-json/pom.xml
index e0425f4b90..a52eec9501 100644
--- a/message/message-json/pom.xml
+++ b/message/message-json/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-json
jar
diff --git a/message/message-sql/pom.xml b/message/message-sql/pom.xml
index ee67903d40..0f3da82f5f 100644
--- a/message/message-sql/pom.xml
+++ b/message/message-sql/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-sql
jar
diff --git a/message/message-text/pom.xml b/message/message-text/pom.xml
index 9bd9751e59..433dc1e30d 100644
--- a/message/message-text/pom.xml
+++ b/message/message-text/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-text
jar
diff --git a/message/message-web/pom.xml b/message/message-web/pom.xml
index 52d43edef1..ecb5096e8a 100644
--- a/message/message-web/pom.xml
+++ b/message/message-web/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-web
jar
diff --git a/message/message-xml/pom.xml b/message/message-xml/pom.xml
index 6a28525f7f..eeeba6d3f9 100644
--- a/message/message-xml/pom.xml
+++ b/message/message-xml/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message-xml
jar
diff --git a/message/pom.xml b/message/pom.xml
index 6f4bd8f8b2..4eb30c3a15 100644
--- a/message/pom.xml
+++ b/message/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
message
pom
diff --git a/model/pom.xml b/model/pom.xml
index 6f5374a35d..bb9061be13 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
model
jar
diff --git a/pom.xml b/pom.xml
index 96c0ef2847..59d768863c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
pom
flow
Testing framework
diff --git a/report/pom.xml b/report/pom.xml
index 49a65dca4a..991d266783 100644
--- a/report/pom.xml
+++ b/report/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
report
pom
diff --git a/report/report-core/pom.xml b/report/report-core/pom.xml
index 41c30bcee0..1f385a62a1 100644
--- a/report/report-core/pom.xml
+++ b/report/report-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
report-core
jar
diff --git a/report/report-ng/pom.xml b/report/report-ng/pom.xml
index 1d7ef3387e..59bca8c25c 100644
--- a/report/report-ng/pom.xml
+++ b/report/report-ng/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
report-ng
jar
diff --git a/validation/coppice/pom.xml b/validation/coppice/pom.xml
index cda1f54a82..a515d474b2 100644
--- a/validation/coppice/pom.xml
+++ b/validation/coppice/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
coppice
jar
diff --git a/validation/pom.xml b/validation/pom.xml
index 4a89487403..8d0be1996f 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
validation
pom
diff --git a/validation/validation-core/pom.xml b/validation/validation-core/pom.xml
index c191beb3ee..2bcf3ce061 100644
--- a/validation/validation-core/pom.xml
+++ b/validation/validation-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
validation-core
jar
diff --git a/validation/validation-junit4/pom.xml b/validation/validation-junit4/pom.xml
index 01a136ab66..378e19b7fa 100644
--- a/validation/validation-junit4/pom.xml
+++ b/validation/validation-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
validation-junit4
jar
diff --git a/validation/validation-junit5/pom.xml b/validation/validation-junit5/pom.xml
index 6afaf4e67f..76374d9862 100644
--- a/validation/validation-junit5/pom.xml
+++ b/validation/validation-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 0.0.17-SNAPSHOT
+ 1.0.0-SNAPSHOT
validation-junit5
jar
From 8a1dfa9fc52b604ebe47d690cb66a03edcbf7546 Mon Sep 17 00:00:00 2001
From: GitHub Actions
Date: Tue, 10 Oct 2023 16:29:03 +0000
Subject: [PATCH 009/148] [maven-release-plugin] prepare release v1.0.0
---
aggregator/pom.xml | 2 +-
api/pom.xml | 2 +-
assert/assert-core/pom.xml | 2 +-
assert/assert-filter/pom.xml | 2 +-
assert/assert-junit4/pom.xml | 2 +-
assert/assert-junit5/pom.xml | 2 +-
assert/pom.xml | 2 +-
bom/pom.xml | 2 +-
builder/pom.xml | 2 +-
doc/pom.xml | 2 +-
example/app-api/pom.xml | 2 +-
example/app-assert/pom.xml | 2 +-
example/app-core/pom.xml | 2 +-
example/app-framework/pom.xml | 2 +-
example/app-histogram/pom.xml | 2 +-
example/app-itest/pom.xml | 2 +-
example/app-model/pom.xml | 2 +-
example/app-queue/pom.xml | 2 +-
example/app-store/pom.xml | 2 +-
example/app-ui/pom.xml | 2 +-
example/app-web-ui/pom.xml | 2 +-
example/pom.xml | 2 +-
message/message-core/pom.xml | 2 +-
message/message-http/pom.xml | 2 +-
message/message-json/pom.xml | 2 +-
message/message-sql/pom.xml | 2 +-
message/message-text/pom.xml | 2 +-
message/message-web/pom.xml | 2 +-
message/message-xml/pom.xml | 2 +-
message/pom.xml | 2 +-
model/pom.xml | 2 +-
pom.xml | 4 ++--
report/pom.xml | 2 +-
report/report-core/pom.xml | 2 +-
report/report-ng/pom.xml | 2 +-
validation/coppice/pom.xml | 2 +-
validation/pom.xml | 2 +-
validation/validation-core/pom.xml | 2 +-
validation/validation-junit4/pom.xml | 2 +-
validation/validation-junit5/pom.xml | 2 +-
40 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/aggregator/pom.xml b/aggregator/pom.xml
index 360c9398a7..d42c050718 100644
--- a/aggregator/pom.xml
+++ b/aggregator/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
aggregator
jar
diff --git a/api/pom.xml b/api/pom.xml
index 49d402630e..8b4201e58a 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
api
jar
diff --git a/assert/assert-core/pom.xml b/assert/assert-core/pom.xml
index 114315ba5d..e9d54516e9 100644
--- a/assert/assert-core/pom.xml
+++ b/assert/assert-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0-SNAPSHOT
+ 1.0.0
assert-core
jar
diff --git a/assert/assert-filter/pom.xml b/assert/assert-filter/pom.xml
index fde2566809..1d86daf9b8 100644
--- a/assert/assert-filter/pom.xml
+++ b/assert/assert-filter/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0-SNAPSHOT
+ 1.0.0
assert-filter
jar
diff --git a/assert/assert-junit4/pom.xml b/assert/assert-junit4/pom.xml
index 54f536391f..dc8149c884 100644
--- a/assert/assert-junit4/pom.xml
+++ b/assert/assert-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0-SNAPSHOT
+ 1.0.0
assert-junit4
jar
diff --git a/assert/assert-junit5/pom.xml b/assert/assert-junit5/pom.xml
index d84b28af27..2012e62fac 100644
--- a/assert/assert-junit5/pom.xml
+++ b/assert/assert-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0-SNAPSHOT
+ 1.0.0
assert-junit5
jar
diff --git a/assert/pom.xml b/assert/pom.xml
index fc6d2d163a..400cac896e 100644
--- a/assert/pom.xml
+++ b/assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
assert
pom
diff --git a/bom/pom.xml b/bom/pom.xml
index ac541b86ef..34f71c3ace 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
bom
pom
diff --git a/builder/pom.xml b/builder/pom.xml
index a4850b70bb..b1b4696059 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
builder
jar
diff --git a/doc/pom.xml b/doc/pom.xml
index f2224208e8..9d1052bd0d 100644
--- a/doc/pom.xml
+++ b/doc/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
doc
jar
diff --git a/example/app-api/pom.xml b/example/app-api/pom.xml
index 1d08f24771..e74410e39a 100644
--- a/example/app-api/pom.xml
+++ b/example/app-api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-api
jar
diff --git a/example/app-assert/pom.xml b/example/app-assert/pom.xml
index cf3f4e1ad2..6e0ba845ac 100644
--- a/example/app-assert/pom.xml
+++ b/example/app-assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-assert
jar
diff --git a/example/app-core/pom.xml b/example/app-core/pom.xml
index f39fb16ac7..85b61b8d7f 100644
--- a/example/app-core/pom.xml
+++ b/example/app-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-core
jar
diff --git a/example/app-framework/pom.xml b/example/app-framework/pom.xml
index 5c945f94ca..eada4060c8 100644
--- a/example/app-framework/pom.xml
+++ b/example/app-framework/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-framework
jar
diff --git a/example/app-histogram/pom.xml b/example/app-histogram/pom.xml
index efbc53d901..39e055db3c 100644
--- a/example/app-histogram/pom.xml
+++ b/example/app-histogram/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-histogram
jar
diff --git a/example/app-itest/pom.xml b/example/app-itest/pom.xml
index 178c06df08..c5d517aa38 100644
--- a/example/app-itest/pom.xml
+++ b/example/app-itest/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-itest
jar
diff --git a/example/app-model/pom.xml b/example/app-model/pom.xml
index baae19c479..a2f2dd5795 100644
--- a/example/app-model/pom.xml
+++ b/example/app-model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-model
jar
diff --git a/example/app-queue/pom.xml b/example/app-queue/pom.xml
index 7b3777c51b..c0d846652c 100644
--- a/example/app-queue/pom.xml
+++ b/example/app-queue/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-queue
jar
diff --git a/example/app-store/pom.xml b/example/app-store/pom.xml
index c69720da3a..4e54d85cab 100644
--- a/example/app-store/pom.xml
+++ b/example/app-store/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-store
jar
diff --git a/example/app-ui/pom.xml b/example/app-ui/pom.xml
index 6eaf364dce..1ab5aa0f06 100644
--- a/example/app-ui/pom.xml
+++ b/example/app-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-ui
jar
diff --git a/example/app-web-ui/pom.xml b/example/app-web-ui/pom.xml
index 44aa3557e6..064babcfc9 100644
--- a/example/app-web-ui/pom.xml
+++ b/example/app-web-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0-SNAPSHOT
+ 1.0.0
app-web-ui
jar
diff --git a/example/pom.xml b/example/pom.xml
index 1bee62eaa4..0075db21a6 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -5,7 +5,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
com.mastercard.test.flow.example
diff --git a/message/message-core/pom.xml b/message/message-core/pom.xml
index 5a4a2b5d66..7d2d28dc6c 100644
--- a/message/message-core/pom.xml
+++ b/message/message-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-core
jar
diff --git a/message/message-http/pom.xml b/message/message-http/pom.xml
index 48809e251a..2224c3bbe8 100644
--- a/message/message-http/pom.xml
+++ b/message/message-http/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-http
jar
diff --git a/message/message-json/pom.xml b/message/message-json/pom.xml
index a52eec9501..01d872f39c 100644
--- a/message/message-json/pom.xml
+++ b/message/message-json/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-json
jar
diff --git a/message/message-sql/pom.xml b/message/message-sql/pom.xml
index 0f3da82f5f..9527d05d37 100644
--- a/message/message-sql/pom.xml
+++ b/message/message-sql/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-sql
jar
diff --git a/message/message-text/pom.xml b/message/message-text/pom.xml
index 433dc1e30d..20e996db17 100644
--- a/message/message-text/pom.xml
+++ b/message/message-text/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-text
jar
diff --git a/message/message-web/pom.xml b/message/message-web/pom.xml
index ecb5096e8a..b7fdcf39ef 100644
--- a/message/message-web/pom.xml
+++ b/message/message-web/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-web
jar
diff --git a/message/message-xml/pom.xml b/message/message-xml/pom.xml
index eeeba6d3f9..43a6c2e0ba 100644
--- a/message/message-xml/pom.xml
+++ b/message/message-xml/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0-SNAPSHOT
+ 1.0.0
message-xml
jar
diff --git a/message/pom.xml b/message/pom.xml
index 4eb30c3a15..216b8b6087 100644
--- a/message/pom.xml
+++ b/message/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
message
pom
diff --git a/model/pom.xml b/model/pom.xml
index bb9061be13..9dac37e797 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
model
jar
diff --git a/pom.xml b/pom.xml
index 59d768863c..58a05accc2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
pom
flow
Testing framework
@@ -41,7 +41,7 @@
scm:git:https://github.com/Mastercard/flow.git
scm:git:https://github.com/Mastercard/flow.git
- HEAD
+ v1.0.0
https://github.com/Mastercard/flow
diff --git a/report/pom.xml b/report/pom.xml
index 991d266783..dfd90f23ea 100644
--- a/report/pom.xml
+++ b/report/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
report
pom
diff --git a/report/report-core/pom.xml b/report/report-core/pom.xml
index 1f385a62a1..6b4009e95e 100644
--- a/report/report-core/pom.xml
+++ b/report/report-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.0-SNAPSHOT
+ 1.0.0
report-core
jar
diff --git a/report/report-ng/pom.xml b/report/report-ng/pom.xml
index 59bca8c25c..030b390760 100644
--- a/report/report-ng/pom.xml
+++ b/report/report-ng/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.0-SNAPSHOT
+ 1.0.0
report-ng
jar
diff --git a/validation/coppice/pom.xml b/validation/coppice/pom.xml
index a515d474b2..b3e9a01c5f 100644
--- a/validation/coppice/pom.xml
+++ b/validation/coppice/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0-SNAPSHOT
+ 1.0.0
coppice
jar
diff --git a/validation/pom.xml b/validation/pom.xml
index 8d0be1996f..0a3827d2da 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0-SNAPSHOT
+ 1.0.0
validation
pom
diff --git a/validation/validation-core/pom.xml b/validation/validation-core/pom.xml
index 2bcf3ce061..558d557f90 100644
--- a/validation/validation-core/pom.xml
+++ b/validation/validation-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0-SNAPSHOT
+ 1.0.0
validation-core
jar
diff --git a/validation/validation-junit4/pom.xml b/validation/validation-junit4/pom.xml
index 378e19b7fa..398bfd0645 100644
--- a/validation/validation-junit4/pom.xml
+++ b/validation/validation-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0-SNAPSHOT
+ 1.0.0
validation-junit4
jar
diff --git a/validation/validation-junit5/pom.xml b/validation/validation-junit5/pom.xml
index 76374d9862..e5092df164 100644
--- a/validation/validation-junit5/pom.xml
+++ b/validation/validation-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0-SNAPSHOT
+ 1.0.0
validation-junit5
jar
From bfa039226c53d3092fe416d4f8cd833465bf80da Mon Sep 17 00:00:00 2001
From: GitHub Actions
Date: Tue, 10 Oct 2023 16:29:06 +0000
Subject: [PATCH 010/148] [maven-release-plugin] prepare for next development
iteration
---
aggregator/pom.xml | 2 +-
api/pom.xml | 2 +-
assert/assert-core/pom.xml | 2 +-
assert/assert-filter/pom.xml | 2 +-
assert/assert-junit4/pom.xml | 2 +-
assert/assert-junit5/pom.xml | 2 +-
assert/pom.xml | 2 +-
bom/pom.xml | 2 +-
builder/pom.xml | 2 +-
doc/pom.xml | 2 +-
example/app-api/pom.xml | 2 +-
example/app-assert/pom.xml | 2 +-
example/app-core/pom.xml | 2 +-
example/app-framework/pom.xml | 2 +-
example/app-histogram/pom.xml | 2 +-
example/app-itest/pom.xml | 2 +-
example/app-model/pom.xml | 2 +-
example/app-queue/pom.xml | 2 +-
example/app-store/pom.xml | 2 +-
example/app-ui/pom.xml | 2 +-
example/app-web-ui/pom.xml | 2 +-
example/pom.xml | 2 +-
message/message-core/pom.xml | 2 +-
message/message-http/pom.xml | 2 +-
message/message-json/pom.xml | 2 +-
message/message-sql/pom.xml | 2 +-
message/message-text/pom.xml | 2 +-
message/message-web/pom.xml | 2 +-
message/message-xml/pom.xml | 2 +-
message/pom.xml | 2 +-
model/pom.xml | 2 +-
pom.xml | 4 ++--
report/pom.xml | 2 +-
report/report-core/pom.xml | 2 +-
report/report-ng/pom.xml | 2 +-
validation/coppice/pom.xml | 2 +-
validation/pom.xml | 2 +-
validation/validation-core/pom.xml | 2 +-
validation/validation-junit4/pom.xml | 2 +-
validation/validation-junit5/pom.xml | 2 +-
40 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/aggregator/pom.xml b/aggregator/pom.xml
index d42c050718..44c7052cc0 100644
--- a/aggregator/pom.xml
+++ b/aggregator/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
aggregator
jar
diff --git a/api/pom.xml b/api/pom.xml
index 8b4201e58a..a0eeae8494 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
api
jar
diff --git a/assert/assert-core/pom.xml b/assert/assert-core/pom.xml
index e9d54516e9..4702e7970f 100644
--- a/assert/assert-core/pom.xml
+++ b/assert/assert-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0
+ 1.0.1-SNAPSHOT
assert-core
jar
diff --git a/assert/assert-filter/pom.xml b/assert/assert-filter/pom.xml
index 1d86daf9b8..cd3a455397 100644
--- a/assert/assert-filter/pom.xml
+++ b/assert/assert-filter/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0
+ 1.0.1-SNAPSHOT
assert-filter
jar
diff --git a/assert/assert-junit4/pom.xml b/assert/assert-junit4/pom.xml
index dc8149c884..dc94600596 100644
--- a/assert/assert-junit4/pom.xml
+++ b/assert/assert-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0
+ 1.0.1-SNAPSHOT
assert-junit4
jar
diff --git a/assert/assert-junit5/pom.xml b/assert/assert-junit5/pom.xml
index 2012e62fac..ab97ddb5ea 100644
--- a/assert/assert-junit5/pom.xml
+++ b/assert/assert-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.0
+ 1.0.1-SNAPSHOT
assert-junit5
jar
diff --git a/assert/pom.xml b/assert/pom.xml
index 400cac896e..624493108f 100644
--- a/assert/pom.xml
+++ b/assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
assert
pom
diff --git a/bom/pom.xml b/bom/pom.xml
index 34f71c3ace..4a693d2517 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
bom
pom
diff --git a/builder/pom.xml b/builder/pom.xml
index b1b4696059..cb49aa1c18 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
builder
jar
diff --git a/doc/pom.xml b/doc/pom.xml
index 9d1052bd0d..c32a5637bd 100644
--- a/doc/pom.xml
+++ b/doc/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
doc
jar
diff --git a/example/app-api/pom.xml b/example/app-api/pom.xml
index e74410e39a..9f6054774f 100644
--- a/example/app-api/pom.xml
+++ b/example/app-api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-api
jar
diff --git a/example/app-assert/pom.xml b/example/app-assert/pom.xml
index 6e0ba845ac..329970fbd7 100644
--- a/example/app-assert/pom.xml
+++ b/example/app-assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-assert
jar
diff --git a/example/app-core/pom.xml b/example/app-core/pom.xml
index 85b61b8d7f..9f5958f14a 100644
--- a/example/app-core/pom.xml
+++ b/example/app-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-core
jar
diff --git a/example/app-framework/pom.xml b/example/app-framework/pom.xml
index eada4060c8..2da564943f 100644
--- a/example/app-framework/pom.xml
+++ b/example/app-framework/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-framework
jar
diff --git a/example/app-histogram/pom.xml b/example/app-histogram/pom.xml
index 39e055db3c..045144ba01 100644
--- a/example/app-histogram/pom.xml
+++ b/example/app-histogram/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-histogram
jar
diff --git a/example/app-itest/pom.xml b/example/app-itest/pom.xml
index c5d517aa38..bfc3996bbe 100644
--- a/example/app-itest/pom.xml
+++ b/example/app-itest/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-itest
jar
diff --git a/example/app-model/pom.xml b/example/app-model/pom.xml
index a2f2dd5795..9cc85fe85f 100644
--- a/example/app-model/pom.xml
+++ b/example/app-model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-model
jar
diff --git a/example/app-queue/pom.xml b/example/app-queue/pom.xml
index c0d846652c..5223203a84 100644
--- a/example/app-queue/pom.xml
+++ b/example/app-queue/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-queue
jar
diff --git a/example/app-store/pom.xml b/example/app-store/pom.xml
index 4e54d85cab..09084fcf22 100644
--- a/example/app-store/pom.xml
+++ b/example/app-store/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-store
jar
diff --git a/example/app-ui/pom.xml b/example/app-ui/pom.xml
index 1ab5aa0f06..3a413cd0d7 100644
--- a/example/app-ui/pom.xml
+++ b/example/app-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-ui
jar
diff --git a/example/app-web-ui/pom.xml b/example/app-web-ui/pom.xml
index 064babcfc9..deb5482a98 100644
--- a/example/app-web-ui/pom.xml
+++ b/example/app-web-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.0
+ 1.0.1-SNAPSHOT
app-web-ui
jar
diff --git a/example/pom.xml b/example/pom.xml
index 0075db21a6..06bae86f01 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -5,7 +5,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
com.mastercard.test.flow.example
diff --git a/message/message-core/pom.xml b/message/message-core/pom.xml
index 7d2d28dc6c..063c660be5 100644
--- a/message/message-core/pom.xml
+++ b/message/message-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-core
jar
diff --git a/message/message-http/pom.xml b/message/message-http/pom.xml
index 2224c3bbe8..6e7a8615e6 100644
--- a/message/message-http/pom.xml
+++ b/message/message-http/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-http
jar
diff --git a/message/message-json/pom.xml b/message/message-json/pom.xml
index 01d872f39c..86c489b779 100644
--- a/message/message-json/pom.xml
+++ b/message/message-json/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-json
jar
diff --git a/message/message-sql/pom.xml b/message/message-sql/pom.xml
index 9527d05d37..dfc7953792 100644
--- a/message/message-sql/pom.xml
+++ b/message/message-sql/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-sql
jar
diff --git a/message/message-text/pom.xml b/message/message-text/pom.xml
index 20e996db17..b4fa67ebf1 100644
--- a/message/message-text/pom.xml
+++ b/message/message-text/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-text
jar
diff --git a/message/message-web/pom.xml b/message/message-web/pom.xml
index b7fdcf39ef..3b142d4666 100644
--- a/message/message-web/pom.xml
+++ b/message/message-web/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-web
jar
diff --git a/message/message-xml/pom.xml b/message/message-xml/pom.xml
index 43a6c2e0ba..517d9af2d3 100644
--- a/message/message-xml/pom.xml
+++ b/message/message-xml/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.0
+ 1.0.1-SNAPSHOT
message-xml
jar
diff --git a/message/pom.xml b/message/pom.xml
index 216b8b6087..16cc1e2a80 100644
--- a/message/pom.xml
+++ b/message/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
message
pom
diff --git a/model/pom.xml b/model/pom.xml
index 9dac37e797..a6f2184aa6 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
model
jar
diff --git a/pom.xml b/pom.xml
index 58a05accc2..b76422896b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
pom
flow
Testing framework
@@ -41,7 +41,7 @@
scm:git:https://github.com/Mastercard/flow.git
scm:git:https://github.com/Mastercard/flow.git
- v1.0.0
+ HEAD
https://github.com/Mastercard/flow
diff --git a/report/pom.xml b/report/pom.xml
index dfd90f23ea..b61b4c8047 100644
--- a/report/pom.xml
+++ b/report/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
report
pom
diff --git a/report/report-core/pom.xml b/report/report-core/pom.xml
index 6b4009e95e..838eadd530 100644
--- a/report/report-core/pom.xml
+++ b/report/report-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.0
+ 1.0.1-SNAPSHOT
report-core
jar
diff --git a/report/report-ng/pom.xml b/report/report-ng/pom.xml
index 030b390760..ff184aaf60 100644
--- a/report/report-ng/pom.xml
+++ b/report/report-ng/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.0
+ 1.0.1-SNAPSHOT
report-ng
jar
diff --git a/validation/coppice/pom.xml b/validation/coppice/pom.xml
index b3e9a01c5f..b5c7a188a7 100644
--- a/validation/coppice/pom.xml
+++ b/validation/coppice/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0
+ 1.0.1-SNAPSHOT
coppice
jar
diff --git a/validation/pom.xml b/validation/pom.xml
index 0a3827d2da..ff183d75d2 100644
--- a/validation/pom.xml
+++ b/validation/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.0
+ 1.0.1-SNAPSHOT
validation
pom
diff --git a/validation/validation-core/pom.xml b/validation/validation-core/pom.xml
index 558d557f90..80fc62b9ea 100644
--- a/validation/validation-core/pom.xml
+++ b/validation/validation-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0
+ 1.0.1-SNAPSHOT
validation-core
jar
diff --git a/validation/validation-junit4/pom.xml b/validation/validation-junit4/pom.xml
index 398bfd0645..ff6f664a24 100644
--- a/validation/validation-junit4/pom.xml
+++ b/validation/validation-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0
+ 1.0.1-SNAPSHOT
validation-junit4
jar
diff --git a/validation/validation-junit5/pom.xml b/validation/validation-junit5/pom.xml
index e5092df164..8d11927577 100644
--- a/validation/validation-junit5/pom.xml
+++ b/validation/validation-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
validation
- 1.0.0
+ 1.0.1-SNAPSHOT
validation-junit5
jar
From c8a14d334f10bd87996cf8bbbdbc1c7d2b0f016f Mon Sep 17 00:00:00 2001
From: therealryan
Date: Tue, 10 Oct 2023 16:35:46 +0000
Subject: [PATCH 011/148] Update changelog for "v1.0.0"
This commit was created by changelog-from-release in 'Changelog' CI workflow
---
CHANGELOG.md | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index de1790f5be..3788ef6c19 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,100 @@
+
+# [v1.0.0](https://github.com/Mastercard/flow/releases/tag/v1.0.0) - 10 Oct 2023
+
+
+
+## What's Changed
+### Enhancements
+* Added query convenience methods by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/463
+* No point in the tab bar if there's only one tab with content by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/464
+* SUT highlight by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/545
+* Validation check for lazy model tagging by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/546
+* Report naming api by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/559
+### Dependencies
+
+Dependabot has been busy
+
+* Bump @adobe/css-tools from 4.0.1 to 4.3.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/523
+* Bump @babel/core from 7.22.10 to 7.22.11 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/514
+* Bump @babel/core from 7.22.11 to 7.22.17 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/537
+* Bump @babel/core from 7.22.17 to 7.22.20 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/544
+* Bump @babel/core from 7.22.20 to 7.23.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/564
+* Bump @babel/core from 7.22.8 to 7.22.9 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/465
+* Bump @babel/core from 7.22.9 to 7.22.10 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/502
+* Bump @types/d3 from 7.4.0 to 7.4.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/549
+* Bump @types/dompurify from 3.0.2 to 3.0.3 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/551
+* Bump @types/jasmine from 4.3.5 to 4.3.6 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/542
+* Bump @types/jasmine from 4.3.6 to 5.1.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/575
+* Bump @types/node from 20.4.1 to 20.4.2 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/466
+* Bump @types/node from 20.4.2 to 20.4.4 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/473
+* Bump @types/node from 20.4.4 to 20.4.5 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/491
+* Bump @types/node from 20.4.5 to 20.4.8 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/497
+* Bump @types/node from 20.4.8 to 20.5.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/504
+* Bump @types/node from 20.5.0 to 20.5.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/511
+* Bump @types/node from 20.5.1 to 20.5.7 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/522
+* Bump @types/node from 20.5.7 to 20.5.9 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/525
+* Bump @types/node from 20.5.9 to 20.6.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/536
+* Bump @types/node from 20.6.0 to 20.6.2 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/540
+* Bump @types/node from 20.6.2 to 20.6.5 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/550
+* Bump @types/node from 20.6.5 to 20.8.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/563
+* Bump @types/node from 20.8.0 to 20.8.3 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/576
+* Bump actions/cache from 3.3.1 to 3.3.2 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/532
+* Bump actions/checkout from 3.5.3 to 3.6.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/517
+* Bump actions/checkout from 3.6.0 to 4.0.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/533
+* Bump actions/checkout from 4.0.0 to 4.1.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/556
+* Bump actions/setup-java from 3.11.0 to 3.12.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/492
+* Bump actions/setup-java from 3.12.0 to 3.13.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/557
+* Bump actions/setup-node from 3.7.0 to 3.8.1 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/509
+* Bump actions/upload-artifact from 3.1.2 to 3.1.3 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/531
+* Bump com.github.eirslett:frontend-maven-plugin from 1.13.4 to 1.14.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/539
+* Bump com.h2database:h2 from 2.2.220 to 2.2.222 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/529
+* Bump com.h2database:h2 from 2.2.222 to 2.2.224 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/554
+* Bump info.picocli:picocli from 4.7.4 to 4.7.5 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/518
+* Bump io.github.bonigarcia:webdrivermanager from 5.3.3 to 5.5.2 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/521
+* Bump io.github.bonigarcia:webdrivermanager from 5.5.2 to 5.5.3 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/528
+* Bump jasmine-core from 5.0.1 to 5.1.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/474
+* Bump jasmine-core from 5.1.0 to 5.1.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/513
+* Bump mermaid from 10.2.4 to 10.3.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/487
+* Bump mermaid from 10.3.0 to 10.3.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/503
+* Bump mermaid from 10.3.1 to 10.4.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/516
+* Bump mermaid from 10.4.0 to 10.5.0 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/572
+* Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.3.0 to 3.4.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/519
+* Bump org.apache.maven.plugins:maven-enforcer-plugin from 3.4.0 to 3.4.1 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/535
+* Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/538
+* Bump org.apache.maven.plugins:maven-shade-plugin from 3.5.0 to 3.5.1 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/552
+* Bump org.pitest:pitest-maven from 1.14.2 to 1.14.3 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/501
+* Bump org.pitest:pitest-maven from 1.14.3 to 1.14.4 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/508
+* Bump org.pitest:pitest-maven from 1.14.4 to 1.15.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/553
+* Bump org.seleniumhq.selenium:selenium-java from 4.10.0 to 4.11.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/498
+* Bump org.seleniumhq.selenium:selenium-java from 4.11.0 to 4.12.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/527
+* Bump org.seleniumhq.selenium:selenium-java from 4.12.0 to 4.12.1 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/534
+* Bump org.seleniumhq.selenium:selenium-java from 4.12.1 to 4.13.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/561
+* Bump org.slf4j:slf4j-simple from 2.0.7 to 2.0.9 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/530
+* Bump ossf/scorecard-action from 2.2.0 to 2.3.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/571
+* Bump stefanzweifel/git-auto-commit-action from 4.16.0 to 5.0.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/570
+* Bump step-security/harden-runner from 2.4.1 to 2.5.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/493
+* Bump step-security/harden-runner from 2.5.0 to 2.5.1 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/500
+* Bump step-security/harden-runner from 2.5.1 to 2.6.0 by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/569
+* Bump tslib from 2.6.0 to 2.6.1 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/488
+* Bump tslib from 2.6.1 to 2.6.2 in /report/report-ng by [@dependabot](https://github.com/dependabot) in https://github.com/Mastercard/flow/pull/510
+
+
+
+### Other Changes
+* Using junit bom by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/475
+* LoC is not interesting enough to merit a badge by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/486
+* BoM has made this workaround extraneous by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/547
+* Improved linux behaviours by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/548
+* Corrected system definition by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/560
+* Diff demo by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/568
+* Perhaps it's time to stop swithering? by [@therealryan](https://github.com/therealryan) in https://github.com/Mastercard/flow/pull/577
+
+
+**Full Changelog**: https://github.com/Mastercard/flow/compare/v0.0.16...v1.0.0
+
+[Changes][v1.0.0]
+
+
# [v0.0.16](https://github.com/Mastercard/flow/releases/tag/v0.0.16) - 13 Jul 2023
@@ -519,6 +616,7 @@
[Changes][v0.0.3]
+[v1.0.0]: https://github.com/Mastercard/flow/compare/v0.0.16...v1.0.0
[v0.0.16]: https://github.com/Mastercard/flow/compare/v0.0.15...v0.0.16
[v0.0.15]: https://github.com/Mastercard/flow/compare/v0.0.14...v0.0.15
[v0.0.14]: https://github.com/Mastercard/flow/compare/v0.0.13...v0.0.14
From c70630e1e80c6c639b4bd9d0ee3bca2e0a73d454 Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Fri, 13 Oct 2023 09:42:47 +0100
Subject: [PATCH 012/148] more useful link destination (#578)
---
doc/src/main/markdown/quickstart.md | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/doc/src/main/markdown/quickstart.md b/doc/src/main/markdown/quickstart.md
index 22bf8f6f1e..907724d4bf 100644
--- a/doc/src/main/markdown/quickstart.md
+++ b/doc/src/main/markdown/quickstart.md
@@ -279,13 +279,7 @@ Stream checks() {
Run the test - it should pass.
-If you'd prefer to use jUnit4, then [`validation-junit4` is also available][junit4.Validator].
-
-
-
-[junit4.Validator]: ../../../../validation/validation-junit4/src/main/java/com/mastercard/test/flow/validation/junit4/Validator.java
-
-
+If you'd prefer to use jUnit4, then [`validation-junit4` is also available](../../../../validation/validation-junit4).
## Asserting the model against the system
@@ -341,12 +335,7 @@ The `behaviour()` is where you define the test actions. The behaviour defined he
Run the test - it should pass.
Try changing the message values in the flows or the system behaviour to provoke a failure.
-If you'd prefer to use jUnit4, then [`assert-junit4` is also available][junit4.Flocessor].
-
-
-[junit4.Flocessor]: ../../../../assert/assert-junit4/src/main/java/com/mastercard/test/flow/assrt/junit4/Flocessor.java
-
-
+If you'd prefer to use jUnit4, then [`assert-junit4` is also available](../../../../assert/assert-junit4).
## Conclusion
From 2090f145c53b190aa72c641bda948fe269911758 Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Fri, 13 Oct 2023 16:28:53 +0100
Subject: [PATCH 013/148] fixed link (#579)
---
doc/src/main/markdown/motivation/index.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/main/markdown/motivation/index.md b/doc/src/main/markdown/motivation/index.md
index 5bb69228c3..5e552dc076 100644
--- a/doc/src/main/markdown/motivation/index.md
+++ b/doc/src/main/markdown/motivation/index.md
@@ -204,6 +204,6 @@ While it is important that tests are automated, stable, quick and easy to run, a
---
* [Project root](https://github.com/Mastercard/flow)
- * [Example execution report](https://mastercard.github.io/flow/execution/latest/example/app-itest/target/mctf/latest/index.html)
+ * [Example execution report](https://mastercard.github.io/flow/execution/latest/app-itest/target/mctf/latest/index.html)
* [Quickstart guide](../quickstart.md)
* [Further reading](../further.md)
From f952bece58e51bb0325f5621892ed807be79aab6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 08:49:00 +0100
Subject: [PATCH 014/148] Bump com.fasterxml.jackson.core:jackson-databind from
2.15.2 to 2.15.3 (#580)
Bumps [com.fasterxml.jackson.core:jackson-databind](https://github.com/FasterXML/jackson) from 2.15.2 to 2.15.3.
- [Commits](https://github.com/FasterXML/jackson/commits)
---
updated-dependencies:
- dependency-name: com.fasterxml.jackson.core:jackson-databind
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b76422896b..f250c9f748 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,7 @@
com.fasterxml.jackson.core
jackson-databind
- 2.15.2
+ 2.15.3
From 85c979b2d4c3437f590d5e9d1f2a81623db2ec14 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 08:49:24 +0100
Subject: [PATCH 015/148] Bump org.pitest:pitest-maven from 1.15.0 to 1.15.1
(#582)
Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.0 to 1.15.1.
- [Release notes](https://github.com/hcoles/pitest/releases)
- [Commits](https://github.com/hcoles/pitest/compare/1.15.0...1.15.1)
---
updated-dependencies:
- dependency-name: org.pitest:pitest-maven
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index f250c9f748..92797ce547 100644
--- a/pom.xml
+++ b/pom.xml
@@ -215,7 +215,7 @@
a `mvn test-compile` invocation -->
org.pitest
pitest-maven
- 1.15.0
+ 1.15.1
false
true
From bf5b39ca3db23c8b2572ac67bfe45947efdb6234 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 08:49:44 +0100
Subject: [PATCH 016/148] Bump @types/node from 20.8.3 to 20.8.6 in
/report/report-ng (#583)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.3 to 20.8.6.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 15 +++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index b200f514e7..ea44d7c05d 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -37,7 +37,7 @@
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
"@types/jasmine": "~5.1.0",
- "@types/node": "^20.8.3",
+ "@types/node": "^20.8.6",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
"jasmine-core": "~5.1.1",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index eefa53fc12..6c34f2f24a 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1926,10 +1926,12 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
-"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.3":
- version "20.8.3"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.3.tgz#c4ae2bb1cfab2999ed441a95c122bbbe1567a66d"
- integrity sha512-jxiZQFpb+NlH5kjW49vXxvxTjeeqlbsnTAdBTKpzEdPs9itay7MscYXz3Fo9VYFEsfQ6LJFitHad3faerLAjCw==
+"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.6":
+ version "20.8.6"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa"
+ integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==
+ dependencies:
+ undici-types "~5.25.1"
"@types/parse-json@^4.0.0":
version "4.0.0"
@@ -7719,6 +7721,11 @@ ua-parser-js@^0.7.30:
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532"
integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==
+undici-types@~5.25.1:
+ version "5.25.3"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3"
+ integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==
+
unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz#301acdc525631670d39f6146e0e77ff6bbdebddc"
From e1404df476b3a4442007cda1017ae4c57ff15565 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Oct 2023 08:50:02 +0100
Subject: [PATCH 017/148] Bump @babel/core from 7.23.0 to 7.23.2 in
/report/report-ng (#584)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.23.0 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/@babel/core@7.23.2/packages/babel-core)
---
updated-dependencies:
- dependency-name: "@babel/core"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 30 +++++++++++++++---------------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index ea44d7c05d..f92275dbe8 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -21,7 +21,7 @@
"@angular/platform-browser": "^14.1.2",
"@angular/platform-browser-dynamic": "^14.1.2",
"@angular/router": "^14.1.2",
- "@babel/core": "^7.23.0",
+ "@babel/core": "^7.23.2",
"@types/d3": "^7.4.1",
"@types/diff-match-patch": "^1.0.32",
"@types/dompurify": "^3.0.3",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 6c34f2f24a..f50809f031 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -281,20 +281,20 @@
json5 "^2.2.1"
semver "^6.3.0"
-"@babel/core@^7.12.3", "@babel/core@^7.17.2", "@babel/core@^7.23.0":
- version "7.23.0"
- resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.0.tgz#f8259ae0e52a123eb40f552551e647b506a94d83"
- integrity sha512-97z/ju/Jy1rZmDxybphrBuI+jtJjFVoz7Mr9yUQVVVi+DNZE333uFQeMOqcCIy1x3WYBIbWftUSLmbNXNT7qFQ==
+"@babel/core@^7.12.3", "@babel/core@^7.17.2", "@babel/core@^7.23.2":
+ version "7.23.2"
+ resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.23.2.tgz#ed10df0d580fff67c5f3ee70fd22e2e4c90a9f94"
+ integrity sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==
dependencies:
"@ampproject/remapping" "^2.2.0"
"@babel/code-frame" "^7.22.13"
"@babel/generator" "^7.23.0"
"@babel/helper-compilation-targets" "^7.22.15"
"@babel/helper-module-transforms" "^7.23.0"
- "@babel/helpers" "^7.23.0"
+ "@babel/helpers" "^7.23.2"
"@babel/parser" "^7.23.0"
"@babel/template" "^7.22.15"
- "@babel/traverse" "^7.23.0"
+ "@babel/traverse" "^7.23.2"
"@babel/types" "^7.23.0"
convert-source-map "^2.0.0"
debug "^4.1.0"
@@ -567,13 +567,13 @@
"@babel/traverse" "^7.19.0"
"@babel/types" "^7.19.0"
-"@babel/helpers@^7.18.9", "@babel/helpers@^7.23.0":
- version "7.23.1"
- resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.1.tgz#44e981e8ce2b9e99f8f0b703f3326a4636c16d15"
- integrity sha512-chNpneuK18yW5Oxsr+t553UZzzAs3aZnFm4bxhebsNTeshrC95yA7l5yl7GBAG+JG1rF0F7zzD2EixK9mWSDoA==
+"@babel/helpers@^7.18.9", "@babel/helpers@^7.23.2":
+ version "7.23.2"
+ resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.23.2.tgz#2832549a6e37d484286e15ba36a5330483cac767"
+ integrity sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==
dependencies:
"@babel/template" "^7.22.15"
- "@babel/traverse" "^7.23.0"
+ "@babel/traverse" "^7.23.2"
"@babel/types" "^7.23.0"
"@babel/highlight@^7.22.13":
@@ -1236,10 +1236,10 @@
"@babel/parser" "^7.22.15"
"@babel/types" "^7.22.15"
-"@babel/traverse@^7.18.10", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.23.0":
- version "7.23.0"
- resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.0.tgz#18196ddfbcf4ccea324b7f6d3ada00d8c5a99c53"
- integrity sha512-t/QaEvyIoIkwzpiZ7aoSKK8kObQYeF7T2v+dazAYCb8SXtp58zEVkWW7zAnju8FNKNdr4ScAOEDmMItbyOmEYw==
+"@babel/traverse@^7.18.10", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.1", "@babel/traverse@^7.23.2":
+ version "7.23.2"
+ resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.23.2.tgz#329c7a06735e144a506bdb2cad0268b7f46f4ad8"
+ integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==
dependencies:
"@babel/code-frame" "^7.22.13"
"@babel/generator" "^7.23.0"
From 890a64f99c79bb3a821ff59b32989bafd3e7a1bd Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Mon, 16 Oct 2023 09:33:38 +0100
Subject: [PATCH 018/148] Link fix (#586)
* fixed link
* fixed link
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index d123487233..f644aa390c 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@ Testing framework
This project provides a framework in which the flow of data in a system can be modelled.
This model can then be used to drive testing, both of the complete system and of subsystems in isolation.
-These tests produce a rich execution report, [for example](https://mastercard.github.io/flow/execution/latest/example/app-itest/target/mctf/latest/index.html).
+These tests produce a rich execution report, [for example](https://mastercard.github.io/flow/execution/latest/app-itest/target/mctf/latest/index.html).
[This document describes the motivations for this approach](doc/src/main/markdown/motivation/index.md).
From 2e4aeb3e3b9302a08bb5dec5e9861a3541466962 Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Thu, 19 Oct 2023 11:53:16 +0100
Subject: [PATCH 019/148] Fixing system diagram styling (#587)
* mermaid behaviour appears to have changed
* let's try that again
---
.../system-diagram.component.ts | 25 ++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.ts b/report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.ts
index 30210854bc..e9b760eb5d 100644
--- a/report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.ts
+++ b/report/report-ng/projects/report/src/app/system-diagram/system-diagram.component.ts
@@ -245,6 +245,13 @@ export class SystemDiagramComponent implements OnInit {
}
else {
// edge count hasn't changed, so we can get away with editing styles
+
+ // style names have the svg's ID (which is dynamic) as a prefix, so we have to find that first
+ let markers: HTMLElement[] = (Array.from(this.containerElRef?.nativeElement
+ .querySelectorAll("marker")) as HTMLElement[])
+ .filter(marker => marker.id.includes("flowchart-pointEnd"));
+ let pointEndId = markers.length > 0 ? markers[0].id : "unknown!";
+
let paths: HTMLElement[] = (Array.from(this.containerElRef?.nativeElement
.querySelectorAll("path")) as HTMLElement[])
.filter(path => path.classList.contains("flowchart-link"));
@@ -255,16 +262,16 @@ export class SystemDiagramComponent implements OnInit {
&& path.classList.contains("LE-" + edge.to))
.forEach(path => {
if (edge.edge === this.dottedEdge) {
- this.dottedEdgeStyle(path);
+ this.dottedEdgeStyle(path, pointEndId);
}
else if (edge.edge === this.thickEdge) {
- this.thickEdgeStyle(path);
+ this.thickEdgeStyle(path, pointEndId);
}
else if (edge.edge === this.invisibleEdge) {
this.invisibleEdgeStyle(path);
}
else {
- this.lineEdgeStyle(path);
+ this.lineEdgeStyle(path, pointEndId);
}
});
});
@@ -272,25 +279,25 @@ export class SystemDiagramComponent implements OnInit {
}
}
- private lineEdgeStyle(e: HTMLElement): void {
+ private lineEdgeStyle(e: HTMLElement, pointEndId: string): void {
this.replaceClass(e, "edge-thickness-", "normal");
this.replaceClass(e, "edge-pattern-", "solid");
this.setAttr(e, "style", "");
- this.setAttr(e, "marker-end", "url(#flowchart-pointEnd)");
+ this.setAttr(e, "marker-end", "url(#" + pointEndId + ")");
}
- private thickEdgeStyle(e: HTMLElement): void {
+ private thickEdgeStyle(e: HTMLElement, pointEndId: string): void {
this.replaceClass(e, "edge-thickness-", "thick");
this.replaceClass(e, "edge-pattern-", "solid");
this.setAttr(e, "style", "");
- this.setAttr(e, "marker-end", "url(#flowchart-pointEnd)");
+ this.setAttr(e, "marker-end", "url(#" + pointEndId + ")");
}
- private dottedEdgeStyle(e: HTMLElement): void {
+ private dottedEdgeStyle(e: HTMLElement, pointEndId: string): void {
this.replaceClass(e, "edge-thickness-", "normal");
this.replaceClass(e, "edge-pattern-", "dotted");
this.setAttr(e, "style", "");
- this.setAttr(e, "marker-end", "url(#flowchart-pointEnd)");
+ this.setAttr(e, "marker-end", "url(#" + pointEndId + ")");
}
private invisibleEdgeStyle(e: HTMLElement): void {
From c502a92c30990c774d7ee52d482865f3e3d0dd3e Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Oct 2023 08:15:38 +0100
Subject: [PATCH 020/148] Bump actions/checkout from 4.1.0 to 4.1.1 (#588)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/8ade135a41bc03ea155e62e844d188df1ea18608...b4ffde65f46336ab88eb53be808477a3936bae11)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/changelog.yml | 2 +-
.github/workflows/codeql-analysis.yml | 2 +-
.github/workflows/mutation.yml | 4 ++--
.github/workflows/reindex.yml | 2 +-
.github/workflows/release.yml | 2 +-
.github/workflows/scorecards.yml | 2 +-
.github/workflows/sonar.yml | 2 +-
.github/workflows/test.yml | 4 ++--
8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index 6d31fc0f6f..142df4106a 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -9,7 +9,7 @@ jobs:
name: Update changelog
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: main
- uses: rhysd/changelog-from-release/action@ce14e29aaf6ccba000120b741292eabe1d7ea485 # v3.7.1
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index f8d1215264..b63b13d9ce 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -34,7 +34,7 @@ jobs:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout repository
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a # v2.13.4
diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml
index e7044b20bb..ecf4e85eef 100644
--- a/.github/workflows/mutation.yml
+++ b/.github/workflows/mutation.yml
@@ -21,7 +21,7 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 8
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
@@ -67,7 +67,7 @@ jobs:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: pages
diff --git a/.github/workflows/reindex.yml b/.github/workflows/reindex.yml
index b5bee86bd3..3ca13b1441 100644
--- a/.github/workflows/reindex.yml
+++ b/.github/workflows/reindex.yml
@@ -18,7 +18,7 @@ jobs:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: pages
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 06a7ca2cb5..09f206b26a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -15,7 +15,7 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 8
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index cc70c3937f..6b429d147b 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -37,7 +37,7 @@ jobs:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: "Checkout code"
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v3.1.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.1.0
with:
persist-credentials: false
diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index b824a98621..d0fcd16246 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -20,7 +20,7 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v2.6.0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v2.6.0
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b30a5a6c5a..1dafd05c6f 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -19,7 +19,7 @@ jobs:
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK 8
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0
@@ -64,7 +64,7 @@ jobs:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Checkout
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
+ uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: pages
From 6f565a3d6dc2dba8e7cfd493b7a2e74788894449 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Oct 2023 08:16:13 +0100
Subject: [PATCH 021/148] Bump @types/d3 from 7.4.1 to 7.4.2 in
/report/report-ng (#591)
Bumps [@types/d3](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/d3) from 7.4.1 to 7.4.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/d3)
---
updated-dependencies:
- dependency-name: "@types/d3"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index f92275dbe8..b1713e9739 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -22,7 +22,7 @@
"@angular/platform-browser-dynamic": "^14.1.2",
"@angular/router": "^14.1.2",
"@babel/core": "^7.23.2",
- "@types/d3": "^7.4.1",
+ "@types/d3": "^7.4.2",
"@types/diff-match-patch": "^1.0.32",
"@types/dompurify": "^3.0.3",
"diff-match-patch": "^1.0.5",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index f50809f031..44e4c96e1a 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1782,10 +1782,10 @@
"@types/d3-interpolate" "*"
"@types/d3-selection" "*"
-"@types/d3@^7.4.1":
- version "7.4.1"
- resolved "https://registry.yarnpkg.com/@types/d3/-/d3-7.4.1.tgz#0168b616fa551d99e4534d0cbdeb50844c92b597"
- integrity sha512-lBpYmbHTCtFKO1DB1R7E9dXp9/g1F3JXSGOF7iKPZ+wRmYg/Q6tCRHODGOc5Qk25fJRe2PI60EDRf2HLPUncMA==
+"@types/d3@^7.4.2":
+ version "7.4.2"
+ resolved "https://registry.yarnpkg.com/@types/d3/-/d3-7.4.2.tgz#2e9ccbec794b40e1ccac2dad2ba0642bf25b9a10"
+ integrity sha512-Y4g2Yb30ZJmmtqAJTqMRaqXwRawfvpdpVmyEYEcyGNhrQI/Zvkq3k7yE1tdN07aFSmNBfvmegMQ9Fe2qy9ZMhw==
dependencies:
"@types/d3-array" "*"
"@types/d3-axis" "*"
From aa2e588c01c9445c4a4193df02a0476e49872a5c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Oct 2023 08:17:52 +0100
Subject: [PATCH 022/148] Bump @types/node from 20.8.6 to 20.8.7 in
/report/report-ng (#593)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.6 to 20.8.7.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index b1713e9739..6ce96c6c58 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -37,7 +37,7 @@
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
"@types/jasmine": "~5.1.0",
- "@types/node": "^20.8.6",
+ "@types/node": "^20.8.7",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
"jasmine-core": "~5.1.1",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 44e4c96e1a..2a1ddde3c3 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1926,10 +1926,10 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
-"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.6":
- version "20.8.6"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.6.tgz#0dbd4ebcc82ad0128df05d0e6f57e05359ee47fa"
- integrity sha512-eWO4K2Ji70QzKUqRy6oyJWUeB7+g2cRagT3T/nxYibYcT4y2BDL8lqolRXjTHmkZCdJfIPaY73KbJAZmcryxTQ==
+"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.7":
+ version "20.8.7"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25"
+ integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==
dependencies:
undici-types "~5.25.1"
From 275dfd4f4a23ce9fc75f11f8afed6a31592a1a2d Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Oct 2023 08:40:12 +0100
Subject: [PATCH 023/148] Bump org.jacoco:jacoco-maven-plugin from 0.8.10 to
0.8.11 (#589)
Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.10 to 0.8.11.
- [Release notes](https://github.com/jacoco/jacoco/releases)
- [Commits](https://github.com/jacoco/jacoco/compare/v0.8.10...v0.8.11)
---
updated-dependencies:
- dependency-name: org.jacoco:jacoco-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
aggregator/pom.xml | 2 +-
pom.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/aggregator/pom.xml b/aggregator/pom.xml
index 44c7052cc0..e22da7840e 100644
--- a/aggregator/pom.xml
+++ b/aggregator/pom.xml
@@ -195,7 +195,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.10
+ 0.8.11
report-aggregate
diff --git a/pom.xml b/pom.xml
index 92797ce547..689bd2b6d8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -406,7 +406,7 @@
org.jacoco
jacoco-maven-plugin
- 0.8.10
+ 0.8.11
prepare-agent
From 18d485dcc6d040c935e38200e59d3023bae18c34 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 23 Oct 2023 08:47:55 +0100
Subject: [PATCH 024/148] Bump @types/jasmine from 5.1.0 to 5.1.1 in
/report/report-ng (#590)
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)
---
updated-dependencies:
- dependency-name: "@types/jasmine"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index 6ce96c6c58..17b8db2919 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -36,7 +36,7 @@
"@angular-devkit/build-angular": "^14.1.2",
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
- "@types/jasmine": "~5.1.0",
+ "@types/jasmine": "~5.1.1",
"@types/node": "^20.8.7",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 2a1ddde3c3..42c17b97d1 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1894,10 +1894,10 @@
dependencies:
"@types/node" "*"
-"@types/jasmine@~5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-5.1.0.tgz#581b2f7393942a56acd3542fe168c803d7d588d6"
- integrity sha512-XOV0KsqXNX2gUSqk05RWeolIMgaAQ7+l/ozOBoQ8NGwLg+E7J9vgagODtNgfim4jCzEUP0oJ3gnXeC+Zv+Xi1A==
+"@types/jasmine@~5.1.1":
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-5.1.1.tgz#7d2a2a983e1e822858ea9e30d90e11a3fe408fc0"
+ integrity sha512-qL4GoZHHJl1JQ0vK31OtXMfkfGxYJnysmYz9kk0E8j5W96ThKykBF90uD3PcVmQUAzulbsaus2eFiBhCH5itfw==
"@types/json-schema@*", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
version "7.0.11"
From 459c787fd8716d47f5c48cb4ec3c1e606565130a Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:30:39 +0000
Subject: [PATCH 025/148] Bump org.pitest:pitest-maven from 1.15.1 to 1.15.2
(#605)
Bumps [org.pitest:pitest-maven](https://github.com/hcoles/pitest) from 1.15.1 to 1.15.2.
- [Release notes](https://github.com/hcoles/pitest/releases)
- [Commits](https://github.com/hcoles/pitest/compare/1.15.1...1.15.2)
---
updated-dependencies:
- dependency-name: org.pitest:pitest-maven
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 689bd2b6d8..e5beaf06e7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -215,7 +215,7 @@
a `mvn test-compile` invocation -->
org.pitest
pitest-maven
- 1.15.1
+ 1.15.2
false
true
From cc4b90e7348be2c5cefc7b3c3b16212bed4c1c30 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:31:36 +0000
Subject: [PATCH 026/148] Bump actions/setup-node from 3.8.1 to 4.0.0 (#609)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.1 to 4.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d...8f152de45cc393bb48ce5d89d36b731f54556e65)
---
updated-dependencies:
- dependency-name: actions/setup-node
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/mutation.yml | 2 +-
.github/workflows/release.yml | 2 +-
.github/workflows/sonar.yml | 2 +-
.github/workflows/test.yml | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml
index ecf4e85eef..cca1d0939d 100644
--- a/.github/workflows/mutation.yml
+++ b/.github/workflows/mutation.yml
@@ -31,7 +31,7 @@ jobs:
cache: maven
- name: Set up Node
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
+ uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '14.15.1'
cache: 'yarn'
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 09f206b26a..37a06dea13 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -25,7 +25,7 @@ jobs:
cache: maven
- name: Set up Node
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
+ uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: 16
cache: 'yarn'
diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index d0fcd16246..f69cb5ba1f 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -32,7 +32,7 @@ jobs:
cache: maven
- name: Set up Node
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
+ uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '14.15.1'
cache: 'yarn'
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 1dafd05c6f..e435bf55b3 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -29,7 +29,7 @@ jobs:
cache: maven
- name: Set up Node
- uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
+ uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '14.15.1'
cache: 'yarn'
From 6a6d5de4ed347e21b6e769e3154a48dfa6625bbd Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:31:55 +0000
Subject: [PATCH 027/148] Bump @types/node from 20.8.7 to 20.8.9 in
/report/report-ng (#611)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.8.7 to 20.8.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
---
updated-dependencies:
- dependency-name: "@types/node"
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index 17b8db2919..503bf3b76b 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -37,7 +37,7 @@
"@angular/cli": "^14.1.2",
"@angular/compiler-cli": "^14.1.2",
"@types/jasmine": "~5.1.1",
- "@types/node": "^20.8.7",
+ "@types/node": "^20.8.9",
"babel-core": "^6.26.3",
"babel-loader": "^9.1.2",
"jasmine-core": "~5.1.1",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 42c17b97d1..aed2b1f274 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1926,12 +1926,12 @@
resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197"
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
-"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.7":
- version "20.8.7"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.7.tgz#ad23827850843de973096edfc5abc9e922492a25"
- integrity sha512-21TKHHh3eUHIi2MloeptJWALuCu5H7HQTdTrWIFReA8ad+aggoX+lRes3ex7/FtpC+sVUpFMQ+QTfYr74mruiQ==
+"@types/node@*", "@types/node@>=10.0.0", "@types/node@^20.8.9":
+ version "20.8.9"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.9.tgz#646390b4fab269abce59c308fc286dcd818a2b08"
+ integrity sha512-UzykFsT3FhHb1h7yD4CA4YhBHq545JC0YnEz41xkipN88eKQtL6rSgocL5tbAP6Ola9Izm/Aw4Ora8He4x0BHg==
dependencies:
- undici-types "~5.25.1"
+ undici-types "~5.26.4"
"@types/parse-json@^4.0.0":
version "4.0.0"
@@ -7721,10 +7721,10 @@ ua-parser-js@^0.7.30:
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532"
integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw==
-undici-types@~5.25.1:
- version "5.25.3"
- resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.25.3.tgz#e044115914c85f0bcbb229f346ab739f064998c3"
- integrity sha512-Ga1jfYwRn7+cP9v8auvEXN1rX3sWqlayd4HP7OKk4mZWylEmu3KzXDUGrQUN6Ol7qo1gPvB2e5gX6udnyEPgdA==
+undici-types@~5.26.4:
+ version "5.26.5"
+ resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
+ integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
unicode-canonical-property-names-ecmascript@^2.0.0:
version "2.0.0"
From 9cd2120b0a55aeefff8d1927f54fdf188aacd25c Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:32:49 +0000
Subject: [PATCH 028/148] Bump com.github.eirslett:frontend-maven-plugin from
1.14.0 to 1.14.2 (#607)
Bumps [com.github.eirslett:frontend-maven-plugin](https://github.com/eirslett/frontend-maven-plugin) from 1.14.0 to 1.14.2.
- [Changelog](https://github.com/eirslett/frontend-maven-plugin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eirslett/frontend-maven-plugin/compare/frontend-plugins-1.14.0...frontend-plugins-1.14.2)
---
updated-dependencies:
- dependency-name: com.github.eirslett:frontend-maven-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index e5beaf06e7..c05fed2fc0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -247,7 +247,7 @@
com.github.eirslett
frontend-maven-plugin
- 1.14.0
+ 1.14.2
From 3e7a1fe8d81310b0012e0340e35d7db5513c4651 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:33:14 +0000
Subject: [PATCH 029/148] Bump org.pitest:pitest-junit5-plugin from 1.2.0 to
1.2.1 (#606)
Bumps [org.pitest:pitest-junit5-plugin](https://github.com/pitest/pitest-junit5-plugin) from 1.2.0 to 1.2.1.
- [Commits](https://github.com/pitest/pitest-junit5-plugin/compare/1.2.0...1.2.1)
---
updated-dependencies:
- dependency-name: org.pitest:pitest-junit5-plugin
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index c05fed2fc0..8f3199cc07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -229,7 +229,7 @@
org.pitest
pitest-junit5-plugin
- 1.2.0
+ 1.2.1
From 1a4893c81b8f9dbf992f5f1619687dab844d0943 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:59:17 +0000
Subject: [PATCH 030/148] Bump @types/dompurify from 3.0.3 to 3.0.4 in
/report/report-ng (#610)
Bumps [@types/dompurify](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/dompurify) from 3.0.3 to 3.0.4.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/dompurify)
---
updated-dependencies:
- dependency-name: "@types/dompurify"
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index 503bf3b76b..d76fff2cb4 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -24,7 +24,7 @@
"@babel/core": "^7.23.2",
"@types/d3": "^7.4.2",
"@types/diff-match-patch": "^1.0.32",
- "@types/dompurify": "^3.0.3",
+ "@types/dompurify": "^3.0.4",
"diff-match-patch": "^1.0.5",
"mermaid": "^10.5.0",
"ngx-markdown": "^14.0.1",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index aed2b1f274..0a869d613c 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -1830,10 +1830,10 @@
resolved "https://registry.yarnpkg.com/@types/diff-match-patch/-/diff-match-patch-1.0.32.tgz#d9c3b8c914aa8229485351db4865328337a3d09f"
integrity sha512-bPYT5ECFiblzsVzyURaNhljBH2Gh1t9LowgUwciMrNAhFewLkHT2H0Mto07Y4/3KCOGZHRQll3CTtQZ0X11D/A==
-"@types/dompurify@^3.0.3":
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.3.tgz#d34ba1cf4f8b8f2cbfe5d3118dc3b7d81858fa42"
- integrity sha512-odiGr/9/qMqjcBOe5UhcNLOFHSYmKFOyr+bJ/Xu3Qp4k1pNPAlNLUVNNLcLfjQI7+W7ObX58EdD3H+3p3voOvA==
+"@types/dompurify@^3.0.4":
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/@types/dompurify/-/dompurify-3.0.4.tgz#8a6369dec2dd0c397d01751adf3364be035b40d8"
+ integrity sha512-1Jk8S/IRzNSbwQRbuGuLFHviwxQ8pX81ZEW3INY9432Cwb4VedkBYan8gSIXVLOLHBtimOmUTEYphjRVmo+30g==
dependencies:
"@types/trusted-types" "*"
From 652273e61f2646d7cc5c24d1f632ca63e402ee21 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 08:59:33 +0000
Subject: [PATCH 031/148] Bump ossf/scorecard-action from 2.3.0 to 2.3.1 (#608)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/483ef80eb98fb506c348f7d62e28055e49fe2398...0864cf19026789058feabb7e87baa5f140aac736)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
.github/workflows/scorecards.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/scorecards.yml b/.github/workflows/scorecards.yml
index 6b429d147b..e270629a50 100644
--- a/.github/workflows/scorecards.yml
+++ b/.github/workflows/scorecards.yml
@@ -42,7 +42,7 @@ jobs:
persist-credentials: false
- name: "Run analysis"
- uses: ossf/scorecard-action@483ef80eb98fb506c348f7d62e28055e49fe2398 # v2.3.0
+ uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
with:
results_file: results.sarif
results_format: sarif
From 6ee8fd07d686efaa3cea8bd3e760cc359093cae8 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 09:33:22 +0000
Subject: [PATCH 032/148] Bump org.apache.maven.plugins:maven-surefire-plugin
from 3.1.2 to 3.2.1 (#603)
Bumps [org.apache.maven.plugins:maven-surefire-plugin](https://github.com/apache/maven-surefire) from 3.1.2 to 3.2.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.1.2...surefire-3.2.1)
---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-surefire-plugin
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index 8f3199cc07..f8f16b80ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -168,7 +168,7 @@
org.apache.maven.plugins
maven-surefire-plugin
- 3.1.2
+ 3.2.1
From a0164569179b29efa8e12a7c7a56dcd940809361 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 30 Oct 2023 09:36:35 +0000
Subject: [PATCH 033/148] Bump mermaid from 10.5.0 to 10.6.0 in
/report/report-ng (#613)
* Bump mermaid from 10.5.0 to 10.6.0 in /report/report-ng
Bumps [mermaid](https://github.com/mermaid-js/mermaid) from 10.5.0 to 10.6.0.
- [Release notes](https://github.com/mermaid-js/mermaid/releases)
- [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/mermaid-js/mermaid/compare/v10.5.0...v10.6.0)
---
updated-dependencies:
- dependency-name: mermaid
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
* fixed test
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ryan McNally
---
.../java/com/mastercard/test/flow/report/WriterTest.java | 2 +-
report/report-ng/package.json | 2 +-
report/report-ng/yarn.lock | 8 ++++----
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
index 8c6c375729..f0dfba1841 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
@@ -81,7 +81,7 @@ void write() throws Exception {
+ " 1 x detail/823B8031950E57346DCE6FFD4BE56F54.html\n"
+ " 1 x index.html\n"
+ " 1 x res/3rdpartylicenses.txt\n"
- + " 27 x res/_digits_..js\n"
+ + " 28 x res/_digits_..js\n"
+ " 1 x res/common..js\n"
+ " 1 x res/favicon.ico\n"
+ " 1 x res/main..js\n"
diff --git a/report/report-ng/package.json b/report/report-ng/package.json
index d76fff2cb4..a65b150390 100644
--- a/report/report-ng/package.json
+++ b/report/report-ng/package.json
@@ -26,7 +26,7 @@
"@types/diff-match-patch": "^1.0.32",
"@types/dompurify": "^3.0.4",
"diff-match-patch": "^1.0.5",
- "mermaid": "^10.5.0",
+ "mermaid": "^10.6.0",
"ngx-markdown": "^14.0.1",
"rxjs": "~7.8.1",
"tslib": "^2.6.2",
diff --git a/report/report-ng/yarn.lock b/report/report-ng/yarn.lock
index 0a869d613c..73c941308c 100644
--- a/report/report-ng/yarn.lock
+++ b/report/report-ng/yarn.lock
@@ -5457,10 +5457,10 @@ merge2@^1.3.0, merge2@^1.4.1:
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae"
integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==
-mermaid@^10.5.0:
- version "10.5.0"
- resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.5.0.tgz#e90512a65b5c6e29bd86cd04ce45aa31da2be76d"
- integrity sha512-9l0o1uUod78D3/FVYPGSsgV+Z0tSnzLBDiC9rVzvelPxuO80HbN1oDr9ofpPETQy9XpypPQa26fr09VzEPfvWA==
+mermaid@^10.6.0:
+ version "10.6.0"
+ resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-10.6.0.tgz#151af64fb7c6cf1f8a5c403c53c6151832268b87"
+ integrity sha512-Hcti+Q2NiWnb2ZCijSX89Bn2i7TCUwosBdIn/d+u63Sz7y40XU6EKMctT4UX4qZuZGfKGZpfOeim2/KTrdR7aQ==
dependencies:
"@braintree/sanitize-url" "^6.0.1"
"@types/d3-scale" "^4.0.3"
From 82643336c9b946426790415994b64460516c05b0 Mon Sep 17 00:00:00 2001
From: Ryan McNally
Date: Mon, 30 Oct 2023 11:04:01 +0000
Subject: [PATCH 034/148] Duct (#595)
Added duct module - a utility for serving execution reports on your local system
---
README.md | 1 +
aggregator/pom.xml | 8 +-
.../flow/aggregator/SharedConstantTest.java | 21 +
api/pom.xml | 2 +-
.../com/mastercard/test/flow/util/Option.java | 13 +
.../mastercard/test/flow/util/OptionTest.java | 15 +
assert/assert-core/README.md | 4 +
assert/assert-core/pom.xml | 14 +-
.../test/flow/assrt/AbstractFlocessor.java | 10 +-
.../test/flow/assrt/AssertionOptions.java | 30 ++
assert/assert-filter/pom.xml | 2 +-
assert/assert-junit4/pom.xml | 2 +-
assert/assert-junit5/pom.xml | 2 +-
assert/pom.xml | 2 +-
bom/pom.xml | 2 +-
builder/pom.xml | 2 +-
doc/pom.xml | 2 +-
doc/src/main/markdown/further.md | 16 +-
.../test/flow/doc/DependencyTest.java | 1 +
.../test/flow/doc/IconEmbedTest.java | 24 +-
.../test/flow/doc/ModuleDiagramTest.java | 5 +-
.../com/mastercard/test/flow/doc/PomData.java | 11 +
.../mastercard/test/flow/doc/SysOutTest.java | 3 +
.../com/mastercard/test/flow/doc/Util.java | 5 +
example/README.md | 2 +
example/app-api/pom.xml | 2 +-
example/app-assert/pom.xml | 9 +-
example/app-core/pom.xml | 2 +-
example/app-framework/pom.xml | 2 +-
example/app-histogram/pom.xml | 2 +-
example/app-itest/pom.xml | 15 +-
.../example/app/itest/IntegrationTest.java | 50 +--
example/app-model/pom.xml | 2 +-
example/app-queue/pom.xml | 2 +-
example/app-store/pom.xml | 2 +-
example/app-ui/pom.xml | 2 +-
example/app-web-ui/pom.xml | 2 +-
example/pom.xml | 2 +-
message/message-core/pom.xml | 2 +-
message/message-http/pom.xml | 2 +-
message/message-json/pom.xml | 2 +-
message/message-sql/pom.xml | 2 +-
message/message-text/pom.xml | 2 +-
message/message-web/README.md | 2 +-
message/message-web/pom.xml | 2 +-
message/message-xml/pom.xml | 2 +-
message/pom.xml | 2 +-
model/pom.xml | 2 +-
pom.xml | 8 +-
report/README.md | 1 +
report/duct/README.md | 53 +++
report/duct/pom.xml | 95 +++++
.../test/flow/report/duct/Duct.java | 323 +++++++++++++++
.../mastercard/test/flow/report/duct/Gui.java | 17 +
.../test/flow/report/duct/HeadlessGui.java | 18 +
.../test/flow/report/duct/HttpClient.java | 129 ++++++
.../test/flow/report/duct/Reaper.java | 78 ++++
.../test/flow/report/duct/ReportSummary.java | 111 +++++
.../test/flow/report/duct/Search.java | 106 +++++
.../test/flow/report/duct/Server.java | 251 +++++++++++
.../test/flow/report/duct/Spawn.java | 137 ++++++
.../test/flow/report/duct/SystrayGui.java | 169 ++++++++
.../duct/src/main/resources/duct.drawio.svg | 9 +
report/duct/src/main/resources/duct.png | Bin 0 -> 5666 bytes
.../main/resources/simplelogger.properties | 5 +
.../test/flow/report/duct/DuctTest.java | 390 ++++++++++++++++++
.../test/flow/report/duct/DuctTestUtil.java | 219 ++++++++++
.../test/flow/report/duct/ReaperTest.java | 236 +++++++++++
.../test/flow/report/duct/SearchTest.java | 79 ++++
.../test/flow/report/duct/ServeTest.java | 91 ++++
.../test/flow/report/duct/ServerTest.java | 337 +++++++++++++++
.../test/resources/simplelogger.properties | 5 +
report/pom.xml | 3 +-
report/report-core/pom.xml | 4 +-
.../test/flow/report/FailureSink.java | 23 ++
.../mastercard/test/flow/report/JsApp.java | 2 +-
.../test/flow/report/LocalBrowse.java | 196 +++++++++
.../mastercard/test/flow/report/Reader.java | 12 +-
.../mastercard/test/flow/report/Writer.java | 25 +-
.../com/mastercard/test/flow/report/Copy.java | 39 ++
.../test/flow/report/JsAppTest.java | 26 +-
.../test/flow/report/LocalBrowseTest.java | 222 ++++++++++
.../test/flow/report/WriterTest.java | 163 ++++++--
.../flow/report/seq/AbstractSequence.java | 33 +-
.../test/flow/report/seq/ContextSequence.java | 10 +-
.../test/flow/report/seq/DetailSequence.java | 6 +-
.../test/flow/report/seq/DiffSequence.java | 22 +-
.../test/flow/report/seq/FlowSequence.java | 18 +-
.../test/flow/report/seq/IndexSequence.java | 18 +-
.../test/flow/report/seq/LogSequence.java | 6 +-
.../test/flow/report/seq/ResidueSequence.java | 10 +-
report/report-ng/pom.xml | 2 +-
.../report/src/app/app.component.html | 11 +-
.../report/src/app/app.component.spec.ts | 6 +
.../projects/report/src/app/app.component.ts | 12 +-
.../projects/report/src/app/app.module.ts | 8 +
.../duct-index-item.component.css | 38 ++
.../duct-index-item.component.html | 29 ++
.../duct-index-item.component.spec.ts | 23 ++
.../duct-index-item.component.ts | 29 ++
.../app/duct-index/duct-index.component.css | 0
.../app/duct-index/duct-index.component.html | 8 +
.../duct-index/duct-index.component.spec.ts | 29 ++
.../app/duct-index/duct-index.component.ts | 25 ++
.../projects/report/src/app/duct.service.ts | 102 +++++
.../projects/report/src/app/types.ts | 21 +-
.../src/main/resources/no-node/index.html | 2 +-
validation/coppice/pom.xml | 2 +-
validation/pom.xml | 2 +-
validation/validation-core/pom.xml | 2 +-
validation/validation-junit4/pom.xml | 2 +-
validation/validation-junit5/pom.xml | 2 +-
112 files changed, 4118 insertions(+), 255 deletions(-)
create mode 100644 report/duct/README.md
create mode 100644 report/duct/pom.xml
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Duct.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Gui.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/HeadlessGui.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/HttpClient.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Reaper.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/ReportSummary.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Search.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Server.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/Spawn.java
create mode 100644 report/duct/src/main/java/com/mastercard/test/flow/report/duct/SystrayGui.java
create mode 100644 report/duct/src/main/resources/duct.drawio.svg
create mode 100644 report/duct/src/main/resources/duct.png
create mode 100644 report/duct/src/main/resources/simplelogger.properties
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/DuctTest.java
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/DuctTestUtil.java
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/ReaperTest.java
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/SearchTest.java
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServeTest.java
create mode 100644 report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServerTest.java
create mode 100644 report/duct/src/test/resources/simplelogger.properties
create mode 100644 report/report-core/src/main/java/com/mastercard/test/flow/report/FailureSink.java
create mode 100644 report/report-core/src/main/java/com/mastercard/test/flow/report/LocalBrowse.java
create mode 100644 report/report-core/src/test/java/com/mastercard/test/flow/report/Copy.java
create mode 100644 report/report-core/src/test/java/com/mastercard/test/flow/report/LocalBrowseTest.java
create mode 100644 report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.css
create mode 100644 report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.html
create mode 100644 report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.spec.ts
create mode 100644 report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.ts
create mode 100644 report/report-ng/projects/report/src/app/duct-index/duct-index.component.css
create mode 100644 report/report-ng/projects/report/src/app/duct-index/duct-index.component.html
create mode 100644 report/report-ng/projects/report/src/app/duct-index/duct-index.component.spec.ts
create mode 100644 report/report-ng/projects/report/src/app/duct-index/duct-index.component.ts
create mode 100644 report/report-ng/projects/report/src/app/duct.service.ts
diff --git a/README.md b/README.md
index f644aa390c..663c8c462e 100644
--- a/README.md
+++ b/README.md
@@ -65,6 +65,7 @@ graph TB
message-core --> message-web
message-core --> message-xml
report-core --> assert-filter
+ report-core --> duct
report-ng --> report-core
validation-core --> validation-junit4
validation-core --> validation-junit5
diff --git a/aggregator/pom.xml b/aggregator/pom.xml
index e22da7840e..9734eaeb40 100644
--- a/aggregator/pom.xml
+++ b/aggregator/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
aggregator
jar
@@ -125,6 +125,12 @@
${project.version}
+
+ ${project.groupId}
+ duct
+ ${project.version}
+
+
org.junit.jupiter
diff --git a/aggregator/src/test/java/com/mastercard/test/flow/aggregator/SharedConstantTest.java b/aggregator/src/test/java/com/mastercard/test/flow/aggregator/SharedConstantTest.java
index e491240dac..e6ad0558b3 100644
--- a/aggregator/src/test/java/com/mastercard/test/flow/aggregator/SharedConstantTest.java
+++ b/aggregator/src/test/java/com/mastercard/test/flow/aggregator/SharedConstantTest.java
@@ -1,12 +1,17 @@
package com.mastercard.test.flow.aggregator;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
+import com.mastercard.test.flow.assrt.AssertionOptions;
import com.mastercard.test.flow.assrt.Order;
import com.mastercard.test.flow.builder.Chain;
import com.mastercard.test.flow.model.LazyModel;
import com.mastercard.test.flow.report.Writer;
+import com.mastercard.test.flow.report.duct.Duct;
+import com.mastercard.test.flow.util.Option;
import com.mastercard.test.flow.validation.check.ChainOverlapCheck;
import com.mastercard.test.flow.validation.check.ReflectiveModelTaggingCheck;
import com.mastercard.test.flow.validation.check.ResultTagCheck;
@@ -54,4 +59,20 @@ void lazyModelStrings() {
Assertions.assertEquals( LazyModel.MODEL_TAGS_FIELD_NAME,
ReflectiveModelTaggingCheck.MODEL_TAGS_FIELD_NAME );
}
+
+ /**
+ * The duct
module offers {@link Duct#GUI_SUPPRESS}, and we've got
+ * an alias for that in {@link AssertionOptions#DUCT_GUI_SUPPRESS} so that it
+ * gets picked up by the documentation automation. However, duct
is
+ * an optional dependency of assert-core
, so we can depend
+ * on it being available when {@link AssertionOptions} is initialised. Hence we
+ * have to maintain a static copy of the {@link Option} values.
+ */
+ @Test
+ void ductSuppressionOption() {
+ assertEquals( Duct.GUI_SUPPRESS.property(), AssertionOptions.DUCT_GUI_SUPPRESS.property(),
+ "property name" );
+ assertEquals( Duct.GUI_SUPPRESS.description(), AssertionOptions.DUCT_GUI_SUPPRESS.description(),
+ "property description" );
+ }
}
diff --git a/api/pom.xml b/api/pom.xml
index a0eeae8494..50b2a9a86d 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
api
jar
diff --git a/api/src/main/java/com/mastercard/test/flow/util/Option.java b/api/src/main/java/com/mastercard/test/flow/util/Option.java
index d31ec481b9..1c088408a0 100644
--- a/api/src/main/java/com/mastercard/test/flow/util/Option.java
+++ b/api/src/main/java/com/mastercard/test/flow/util/Option.java
@@ -128,6 +128,19 @@ default Stream asList() {
return asList( "," );
}
+ /**
+ * Builds the commandline argument that would set this {@link Option}'s current
+ * value in a new JVM
+ *
+ * @return The commandline argument, or null
if this {@link Option}
+ * has no value
+ */
+ default String commandLineArgument() {
+ return Optional.ofNullable( value() )
+ .map( v -> String.format( "-D%s=%s", property(), v ) )
+ .orElse( null );
+ }
+
/**
* Use in try-with-resources blocks where you want an {@link Option} to have a
* specific value and then revert to the previous value when the block ends
diff --git a/api/src/test/java/com/mastercard/test/flow/util/OptionTest.java b/api/src/test/java/com/mastercard/test/flow/util/OptionTest.java
index 7ff9f6d6ea..8872c40048 100644
--- a/api/src/test/java/com/mastercard/test/flow/util/OptionTest.java
+++ b/api/src/test/java/com/mastercard/test/flow/util/OptionTest.java
@@ -196,4 +196,19 @@ void builder() {
Assertions.assertEquals( "property", b.property() );
Assertions.assertEquals( "default", b.defaultValue() );
}
+
+ /**
+ * Exercises {@link Option#commandLineArgument()}
+ */
+ @Test
+ void commandLineArgument() {
+ try( Temporary t = TSTOPT.temporarily( "abc" ) ) {
+ assertEquals( "-Dtstopt=abc", TSTOPT.commandLineArgument() );
+ }
+
+ try( Temporary t = TSTOPT.temporarily( null ) ) {
+ assertEquals( null, TSTOPT.commandLineArgument() );
+ }
+ }
+
}
diff --git a/assert/assert-core/README.md b/assert/assert-core/README.md
index 4e14087756..9dfc1cca32 100644
--- a/assert/assert-core/README.md
+++ b/assert/assert-core/README.md
@@ -37,6 +37,7 @@ Some aspects of assertion behaviour can be controlled by system properties:
| property | description |
| -------- | ----------- |
+| `mctf.browse.xdg_open` | Supply true to try and fall back to `xdg-open` when java's desktop integration fails |
| `mctf.dir` | The path to the dir where assertion artifacts are saved |
| `mctf.filter.cli.min_width` | The minimum width of the command-line interface |
| `mctf.filter.exclude` | A comma-separated list of tags values that flows must not have |
@@ -47,9 +48,12 @@ Some aspects of assertion behaviour can be controlled by system properties:
| `mctf.filter.update` | Supply `true` to update filter values at runtime in the most appropriate interface.Supply `cli` to force use of the command-line interface or `gui` to force use of the graphical interface |
| `mctf.replay` | The location of a report to replay, or `latest` to replay the most recent local report |
| `mctf.report.dir` | The path from the artifact directory to the report destination |
+| `mctf.report.serve` | Set to `true` to browse reports on a local web server rather than the filesystem. You must have the optional `duct` module on your classpath. |
| `mctf.suppress.assertion` | Set to `true` to continue processing a flow in the face of assertion failure |
| `mctf.suppress.basis` | Set to `true` to process flows whose basis flows have suffered assertion failure |
+| `mctf.suppress.browse` | Supply 'true' to suppress attempts to open browsers |
| `mctf.suppress.dependency` | Set to `true` to process flows whose dependency flows have suffered errors |
+| `mctf.suppress.duct.gui` | Supply 'true' to suppress the duct gui |
| `mctf.suppress.filter` | Set to `true` to process all flows regardless of filter configuration |
| `mctf.suppress.system` | Set to `true` to process when the system under test lacks declared dependencies |
diff --git a/assert/assert-core/pom.xml b/assert/assert-core/pom.xml
index 4702e7970f..070acadee8 100644
--- a/assert/assert-core/pom.xml
+++ b/assert/assert-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
assert-core
jar
@@ -18,6 +18,16 @@
${project.version}
+
+
+ ${project.groupId}
+ duct
+ ${project.version}
+
+ true
+
+
org.junit.jupiter
junit-jupiter
@@ -57,4 +67,4 @@
-
+
\ No newline at end of file
diff --git a/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java b/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java
index 41303e0358..46e64ccab7 100644
--- a/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java
+++ b/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java
@@ -52,6 +52,7 @@
import com.mastercard.test.flow.report.data.LogEvent;
import com.mastercard.test.flow.report.data.ResidueData;
import com.mastercard.test.flow.report.data.TransmissionData;
+import com.mastercard.test.flow.report.duct.Duct;
import com.mastercard.test.flow.util.Dependencies;
import com.mastercard.test.flow.util.Flows;
@@ -1013,7 +1014,14 @@ private void report( Consumer data, boolean error ) {
// also, if appropriate, open a browser to it
if( reporting.shouldOpen( error ) ) {
- report.browse();
+ if( AssertionOptions.DUCT.isTrue() ) {
+ // if you've traced a ClassNotFoundException or NoClassDefFoundError to here,
+ // then you've forgotten to add the duct module to your dependencies.
+ Duct.serve( report.path() );
+ }
+ else {
+ report.browse();
+ }
}
}
}
diff --git a/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AssertionOptions.java b/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AssertionOptions.java
index 6f43360807..e14ff6f133 100644
--- a/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AssertionOptions.java
+++ b/assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AssertionOptions.java
@@ -4,6 +4,8 @@
import com.mastercard.test.flow.Flow;
import com.mastercard.test.flow.assrt.filter.FilterOptions;
+import com.mastercard.test.flow.report.LocalBrowse;
+import com.mastercard.test.flow.report.duct.Duct;
import com.mastercard.test.flow.util.Option;
/**
@@ -24,6 +26,34 @@ public enum AssertionOptions implements Option {
*/
ARTIFACT_DIR(FilterOptions.ARTIFACT_DIR),
+ /**
+ * Allows browser launches to be avoided. An alias for
+ * {@link LocalBrowse#SUPPRESS}
+ */
+ BROWSE_SUPPRESS(LocalBrowse.SUPPRESS),
+
+ /**
+ * Allows the option of a browse-opening fallback. An alias for
+ * {@link LocalBrowse#XDG_OPEN_FALLBACK}
+ */
+ BROWSE_XDG_OPEN_FALLBACK(LocalBrowse.XDG_OPEN_FALLBACK),
+
+ /**
+ * Controls whether we use {@link Duct} or not
+ */
+ DUCT(b -> b.property( "mctf.report.serve" )
+ .description( "Set to `true` to browse reports on a local web"
+ + " server rather than the filesystem. You must have the"
+ + " optional `duct` module on your classpath." )),
+
+ /**
+ * Allows the {@link Duct} gui to be avoided. An alias for
+ * {@link Duct#GUI_SUPPRESS}
+ */
+ DUCT_GUI_SUPPRESS(b -> b
+ .property( "mctf.suppress.duct.gui" )
+ .description( "Supply 'true' to suppress the duct gui" )),
+
/**
* Controls {@link Replay} parameters
*/
diff --git a/assert/assert-filter/pom.xml b/assert/assert-filter/pom.xml
index cd3a455397..1b6c15e45b 100644
--- a/assert/assert-filter/pom.xml
+++ b/assert/assert-filter/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
assert-filter
jar
diff --git a/assert/assert-junit4/pom.xml b/assert/assert-junit4/pom.xml
index dc94600596..df8d5984ed 100644
--- a/assert/assert-junit4/pom.xml
+++ b/assert/assert-junit4/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
assert-junit4
jar
diff --git a/assert/assert-junit5/pom.xml b/assert/assert-junit5/pom.xml
index ab97ddb5ea..3271d6e59c 100644
--- a/assert/assert-junit5/pom.xml
+++ b/assert/assert-junit5/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
assert
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
assert-junit5
jar
diff --git a/assert/pom.xml b/assert/pom.xml
index 624493108f..7004073f0d 100644
--- a/assert/pom.xml
+++ b/assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
assert
pom
diff --git a/bom/pom.xml b/bom/pom.xml
index 4a693d2517..80f38ba7d0 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
bom
pom
diff --git a/builder/pom.xml b/builder/pom.xml
index cb49aa1c18..a8cf678008 100644
--- a/builder/pom.xml
+++ b/builder/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
builder
jar
diff --git a/doc/pom.xml b/doc/pom.xml
index c32a5637bd..c65b59bb0d 100644
--- a/doc/pom.xml
+++ b/doc/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
doc
jar
diff --git a/doc/src/main/markdown/further.md b/doc/src/main/markdown/further.md
index 1a7c7d8d47..d9a2c7bf80 100644
--- a/doc/src/main/markdown/further.md
+++ b/doc/src/main/markdown/further.md
@@ -15,7 +15,7 @@ The execution report includes tooling to aid in change review. If the reports ge
-[AbstractFlocessor.reporting(Reporting,String...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L194-L203,194-203
+[AbstractFlocessor.reporting(Reporting,String...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L195-L204,195-204
[Reporting]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/Reporting.java
@@ -80,8 +80,8 @@ Note that only the tag/index-based filtering can be used to avoid flow construct
-[AbstractFlocessor.filtering(Consumer)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L315-L323,315-323
-[AbstractFlocessor.exercising(Predicate,Consumer)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L328-L353,328-353
+[AbstractFlocessor.filtering(Consumer)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L316-L324,316-324
+[AbstractFlocessor.exercising(Predicate,Consumer)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L329-L354,329-354
@@ -125,7 +125,7 @@ Note that the assertion components will not make any assumptions about the forma
[LogCapture]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/LogCapture.java
[Tail]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/log/Tail.java
[Merge]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/log/Merge.java
-[AbstractFlocessor.logs(LogCapture)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L283-L290,283-290
+[AbstractFlocessor.logs(LogCapture)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L284-L291,284-291
@@ -248,7 +248,7 @@ Consider the following worked example:
[flow.Unpredictable]: ../../../../api/src/main/java/com/mastercard/test/flow/Unpredictable.java
[AbstractMessage.masking(Unpredictable,UnaryOperator)]: ../../../../message/message-core/src/main/java/com/mastercard/test/flow/msg/AbstractMessage.java#L50-L57,50-57
-[AbstractFlocessor.masking(Unpredictable...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L211-L218,211-218
+[AbstractFlocessor.masking(Unpredictable...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L212-L219,212-219
[mask.BenSys]: ../../test/java/com/mastercard/test/flow/doc/mask/BenSys.java
[mask.DieSys]: ../../test/java/com/mastercard/test/flow/doc/mask/DieSys.java
[mask.Unpredictables]: ../../test/java/com/mastercard/test/flow/doc/mask/Unpredictables.java
@@ -258,7 +258,7 @@ Consider the following worked example:
[msg.Mask.andThen(Consumer)]: ../../../../message/message-core/src/main/java/com/mastercard/test/flow/msg/Mask.java#L290-L292,290-292
[BenDiceTest?masking]: ../../test/java/com/mastercard/test/flow/doc/mask/BenDiceTest.java#L31,31
[BenTest]: ../../test/java/com/mastercard/test/flow/doc/mask/BenTest.java
-[AbstractFlocessor.masking(Unpredictable...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L211-L218,211-218
+[AbstractFlocessor.masking(Unpredictable...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L212-L219,212-219
@@ -278,7 +278,7 @@ You can see usage of these types in the example system:
[flow.Context]: ../../../../api/src/main/java/com/mastercard/test/flow/Context.java
[Builder.context(Context)]: ../../../../builder/src/main/java/com/mastercard/test/flow/builder/Builder.java#L225-L232,225-232
[assrt.Applicator]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/Applicator.java
-[AbstractFlocessor.applicators(Applicator...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L257-L263,257-263
+[AbstractFlocessor.applicators(Applicator...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L258-L264,258-264
[model.ctx.QueueProcessing]: ../../../../example/app-model/src/main/java/com/mastercard/test/flow/example/app/model/ctx/QueueProcessing.java
[QueueProcessingApplicator]: ../../../../example/app-assert/src/main/java/com/mastercard/test/flow/example/app/assrt/ctx/QueueProcessingApplicator.java
@@ -301,7 +301,7 @@ You can see usage of these types in the example system:
[flow.Residue]: ../../../../api/src/main/java/com/mastercard/test/flow/Residue.java
[assrt.Checker]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/Checker.java
-[AbstractFlocessor.checkers(Checker...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L270-L276,270-276
+[AbstractFlocessor.checkers(Checker...)]: ../../../../assert/assert-core/src/main/java/com/mastercard/test/flow/assrt/AbstractFlocessor.java#L271-L277,271-277
[model.rsd.DBItems]: ../../../../example/app-model/src/main/java/com/mastercard/test/flow/example/app/model/rsd/DBItems.java
[DBItemsChecker]: ../../../../example/app-assert/src/main/java/com/mastercard/test/flow/example/app/assrt/rsd/DBItemsChecker.java
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/DependencyTest.java b/doc/src/test/java/com/mastercard/test/flow/doc/DependencyTest.java
index 009b1a0fc7..c623b001e5 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/DependencyTest.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/DependencyTest.java
@@ -106,6 +106,7 @@ Stream markdown() {
+ "com.mastercard.test.flow:assert-junit4\n"
+ "com.mastercard.test.flow:assert-junit5\n"
+ "com.mastercard.test.flow:builder\n"
+ + "com.mastercard.test.flow:duct\n"
+ "com.mastercard.test.flow:message-core\n"
+ "com.mastercard.test.flow:message-http\n"
+ "com.mastercard.test.flow:message-json\n"
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/IconEmbedTest.java b/doc/src/test/java/com/mastercard/test/flow/doc/IconEmbedTest.java
index 83f638b4f2..8719da6ae3 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/IconEmbedTest.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/IconEmbedTest.java
@@ -10,6 +10,7 @@
import java.util.TreeSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import java.util.stream.Stream;
import org.junit.jupiter.api.DynamicTest;
@@ -117,15 +118,22 @@ private void registeredIcons( Path template, Set registered ) {
Matcher injection = ICON_SERVICE_INJECTION_PATTERN.matcher( tsContent );
assertTrue( injection.find(), "Failed to find IconEmbedService injection in " + tsFile );
- Pattern registerPattern = Pattern.compile( injection.group( 1 ) + ".register\\((.*?)\\)",
- Pattern.DOTALL );
+ try {
+ Pattern registerPattern = Pattern.compile( injection.group( 1 ) + ".register\\((.*?)\\)",
+ Pattern.DOTALL );
+ Matcher registration = registerPattern.matcher( tsContent );
+ assertTrue( registration.find(), "Failed to find icon registration call in " + tsFile );
- Matcher registration = registerPattern.matcher( tsContent );
- assertTrue( registration.find(), "Failed to find icon registration call in " + tsFile );
-
- Matcher names = Pattern.compile( "\"([a-z_]+)\"" ).matcher( registration.group( 1 ) );
- while( names.find() ) {
- registered.add( names.group( 1 ) );
+ Matcher names = Pattern.compile( "\"([a-z_]+)\"" ).matcher( registration.group( 1 ) );
+ while( names.find() ) {
+ registered.add( names.group( 1 ) );
+ }
+ }
+ catch( PatternSyntaxException pse ) {
+ throw new IllegalStateException(
+ "Failed to compile regex with '" + injection.group( 1 ) + "' taken from " + template,
+ pse );
}
+
}
}
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/ModuleDiagramTest.java b/doc/src/test/java/com/mastercard/test/flow/doc/ModuleDiagramTest.java
index f5a25f5cfe..557347ec59 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/ModuleDiagramTest.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/ModuleDiagramTest.java
@@ -93,6 +93,7 @@ private static String diagram( String orientation, boolean intergroupLinks, Stri
Map> links = new HashMap<>();
root.visit( pd -> pd.dependencies()
+ .filter( dd -> !dd.optional() )
.filter( dd -> artifacts.contains( dd.coords() ) )
.filter( dd -> artifacts.contains( pd.coords() ) )
.filter( dd -> SCOPES.get( pd.groupId() ).contains( dd.scope() ) )
@@ -101,7 +102,9 @@ private static String diagram( String orientation, boolean intergroupLinks, Stri
.add( new Link(
dd.groupId(),
dd.artifactId(),
- "compile".equals( dd.scope() ) ? " --> " : " -.-> ",
+ "compile".equals( dd.scope() )
+ ? " --> "
+ : " -.-> ",
pd.groupId(),
pd.artifactId() ) ) ) );
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/PomData.java b/doc/src/test/java/com/mastercard/test/flow/doc/PomData.java
index a76efdcba3..a6e79d1c4d 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/PomData.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/PomData.java
@@ -176,6 +176,7 @@ public static class DepData {
private final String groupId;
private final String artifactId;
private final String scope;
+ private final boolean optional;
/**
* @param xpath How to extract data
@@ -195,6 +196,9 @@ public static class DepData {
scope = Optional.ofNullable( xpath.evaluate( "scope", n ) )
.filter( s -> !s.isEmpty() )
.orElse( "compile" );
+ optional = Optional.ofNullable( xpath.evaluate( "optional", n ) )
+ .map( "true"::equals )
+ .orElse( false );
}
/**
@@ -224,5 +228,12 @@ public String coords() {
public String scope() {
return scope;
}
+
+ /**
+ * @return true
of the dependency is optional
+ */
+ public boolean optional() {
+ return optional;
+ }
}
}
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/SysOutTest.java b/doc/src/test/java/com/mastercard/test/flow/doc/SysOutTest.java
index 2e07e7f1eb..d7d32af6a6 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/SysOutTest.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/SysOutTest.java
@@ -42,6 +42,9 @@ class SysOutTest {
accept( "../example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/"
+ "IntegrationTest.java",
"System.out.println( \"Serving \" + reportDir );" );
+ accept( "../report/duct/src/main/java/com/mastercard/test/flow/report/duct/"
+ + "Duct.java",
+ "System.err.println( \"Failed to browse \" + served );" );
}
private static void accept( String file, String... line ) {
diff --git a/doc/src/test/java/com/mastercard/test/flow/doc/Util.java b/doc/src/test/java/com/mastercard/test/flow/doc/Util.java
index 87ccc62a03..609c5384ff 100644
--- a/doc/src/test/java/com/mastercard/test/flow/doc/Util.java
+++ b/doc/src/test/java/com/mastercard/test/flow/doc/Util.java
@@ -140,6 +140,11 @@ public FileVisitResult preVisitDirectory( Path dir, BasicFileAttributes attrs )
// so let's not plumb their depths
return FileVisitResult.SKIP_SUBTREE;
}
+ if( dir.endsWith( "target" )
+ && Files.list( dir.getParent() ).anyMatch( p -> p.endsWith( "pom.xml" ) ) ) {
+ // we never want to look in the target dir
+ return FileVisitResult.SKIP_SUBTREE;
+ }
return super.preVisitDirectory( dir, attrs );
}
diff --git a/example/README.md b/example/README.md
index 06e36662b5..e9f76224d0 100644
--- a/example/README.md
+++ b/example/README.md
@@ -84,6 +84,7 @@ graph LR
message-core --> message-web
message-core --> message-xml
report-core --> assert-filter
+ report-core --> duct
report-ng --> report-core
validation-core --> validation-junit4
validation-core --> validation-junit5
@@ -116,6 +117,7 @@ graph LR
assert-junit5 --> app-assert
builder --> app-model
coppice -.-> app-model
+ duct --> app-assert
message-http --> app-model
message-json --> app-model
message-sql --> app-model
diff --git a/example/app-api/pom.xml b/example/app-api/pom.xml
index 9f6054774f..a07c3de48b 100644
--- a/example/app-api/pom.xml
+++ b/example/app-api/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-api
jar
diff --git a/example/app-assert/pom.xml b/example/app-assert/pom.xml
index 329970fbd7..3485a1ec27 100644
--- a/example/app-assert/pom.xml
+++ b/example/app-assert/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-assert
jar
@@ -26,6 +26,13 @@
${project.version}
+
+
+ com.mastercard.test.flow
+ duct
+ ${project.version}
+
+
io.github.bonigarcia
diff --git a/example/app-core/pom.xml b/example/app-core/pom.xml
index 9f5958f14a..d6361d0e46 100644
--- a/example/app-core/pom.xml
+++ b/example/app-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-core
jar
diff --git a/example/app-framework/pom.xml b/example/app-framework/pom.xml
index 2da564943f..7d8b7602ad 100644
--- a/example/app-framework/pom.xml
+++ b/example/app-framework/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-framework
jar
diff --git a/example/app-histogram/pom.xml b/example/app-histogram/pom.xml
index 045144ba01..1fc0c48d03 100644
--- a/example/app-histogram/pom.xml
+++ b/example/app-histogram/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-histogram
jar
diff --git a/example/app-itest/pom.xml b/example/app-itest/pom.xml
index bfc3996bbe..c5e080e6ca 100644
--- a/example/app-itest/pom.xml
+++ b/example/app-itest/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-itest
jar
@@ -16,19 +16,6 @@
-
-
- com.sparkjava
- spark-core
-
-
-
- org.slf4j
- slf4j-api
-
-
-
-
diff --git a/example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java b/example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java
index 1b39afa890..73d2dff347 100644
--- a/example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java
+++ b/example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java
@@ -1,6 +1,7 @@
package com.mastercard.test.flow.example.app.itest;
+import static com.mastercard.test.flow.assrt.Reporting.ALWAYS;
import static com.mastercard.test.flow.assrt.Reporting.FAILURES;
import static com.mastercard.test.flow.example.app.model.ExampleSystem.Actors.CORE;
import static com.mastercard.test.flow.example.app.model.ExampleSystem.Actors.DB;
@@ -14,12 +15,7 @@
import static com.mastercard.test.flow.example.app.model.ExampleSystem.Unpredictables.HOST;
import static com.mastercard.test.flow.example.app.model.ExampleSystem.Unpredictables.RNG;
-import java.awt.Desktop;
-import java.awt.Desktop.Action;
-import java.net.URI;
import java.nio.charset.StandardCharsets;
-import java.nio.file.Path;
-import java.util.function.Supplier;
import java.util.stream.Stream;
import org.junit.jupiter.api.AfterAll;
@@ -47,8 +43,6 @@
import com.mastercard.test.flow.msg.http.HttpReq;
import com.mastercard.test.flow.msg.web.WebSequence;
-import spark.Service;
-
/**
* Spins up a complete instance of the application and compares its behaviour
* against our model
@@ -67,8 +61,6 @@ class IntegrationTest {
}
}
- private static Supplier reportLocation = () -> null;
-
/**
* Creates an instance of the application
*/
@@ -81,7 +73,6 @@ public static void startApp() {
}
clusterManager.startCluster();
-
}
/**
@@ -91,40 +82,7 @@ public static void startApp() {
*/
@AfterAll
public static void stopApp() throws Exception {
-
clusterManager.stopCluster();
-
- if( "true".equals( System.getProperty( "mctf.itest.report.serve" ) ) ) {
- // serve the report
- String reportDir = reportLocation.get().toString();
- System.out.println( "Serving " + reportDir );
- Service service = Service.ignite()
- .port( 0 )
- .externalStaticFileLocation( reportDir );
- service.staticFiles.header( "Access-Control-Allow-Origin", "*" );
- service.init();
- service.awaitInitialization();
-
- // open the browser
- URI uri = new URI( "http://localhost:" + service.port() );
- if( Desktop.isDesktopSupported() && Desktop.getDesktop().isSupported( Action.BROWSE ) ) {
- System.out.println( "Opening browser to " + uri );
- Desktop.getDesktop().browse( uri );
- }
- else {
- System.out.println( "Open your browser to " + uri );
- }
-
- // wait it till the human is done with it
- System.out.println( "Hit enter to shutdown the server" );
- // noinspection ResultOfMethodCallIgnored
- System.in.read();
-
- // shut it down
- service.stop();
- service.awaitStop();
- System.out.println( "Shutdown complete" );
- }
}
/**
@@ -133,7 +91,7 @@ public static void stopApp() throws Exception {
@TestFactory
Stream flows() {
Flocessor f = new Flocessor( "Integration test", ExampleSystem.MODEL )
- .reporting( FAILURES )
+ .reporting( AssertionOptions.DUCT.isTrue() ? ALWAYS : FAILURES )
.system( State.FUL, WEB_UI, UI, CORE, QUEUE, HISTOGRAM, STORE, DB )
.masking( BORING, CLOCK, HOST, RNG )
.logs( Util.LOG_CAPTURE )
@@ -181,10 +139,6 @@ Stream flows() {
LOG.warn( "Complete" );
} );
- // we need to know where the report went in order to serve it, but that only
- // becomes apparent *after* flow processing
- reportLocation = () -> f.report();
-
return f.tests();
}
diff --git a/example/app-model/pom.xml b/example/app-model/pom.xml
index 9cc85fe85f..ff3bd9547f 100644
--- a/example/app-model/pom.xml
+++ b/example/app-model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-model
jar
diff --git a/example/app-queue/pom.xml b/example/app-queue/pom.xml
index 5223203a84..8ba9721ee1 100644
--- a/example/app-queue/pom.xml
+++ b/example/app-queue/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-queue
jar
diff --git a/example/app-store/pom.xml b/example/app-store/pom.xml
index 09084fcf22..35fb23a57d 100644
--- a/example/app-store/pom.xml
+++ b/example/app-store/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-store
jar
diff --git a/example/app-ui/pom.xml b/example/app-ui/pom.xml
index 3a413cd0d7..0fd1c48217 100644
--- a/example/app-ui/pom.xml
+++ b/example/app-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-ui
jar
diff --git a/example/app-web-ui/pom.xml b/example/app-web-ui/pom.xml
index deb5482a98..70edac3287 100644
--- a/example/app-web-ui/pom.xml
+++ b/example/app-web-ui/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow.example
app
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
app-web-ui
jar
diff --git a/example/pom.xml b/example/pom.xml
index 06bae86f01..856c3d9e56 100644
--- a/example/pom.xml
+++ b/example/pom.xml
@@ -5,7 +5,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
com.mastercard.test.flow.example
diff --git a/message/message-core/pom.xml b/message/message-core/pom.xml
index 063c660be5..786c4bf68f 100644
--- a/message/message-core/pom.xml
+++ b/message/message-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-core
jar
diff --git a/message/message-http/pom.xml b/message/message-http/pom.xml
index 6e7a8615e6..6dd3d063a6 100644
--- a/message/message-http/pom.xml
+++ b/message/message-http/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-http
jar
diff --git a/message/message-json/pom.xml b/message/message-json/pom.xml
index 86c489b779..789f7fd64e 100644
--- a/message/message-json/pom.xml
+++ b/message/message-json/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-json
jar
diff --git a/message/message-sql/pom.xml b/message/message-sql/pom.xml
index dfc7953792..a8dffefafe 100644
--- a/message/message-sql/pom.xml
+++ b/message/message-sql/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-sql
jar
diff --git a/message/message-text/pom.xml b/message/message-text/pom.xml
index b4fa67ebf1..e96e8d2077 100644
--- a/message/message-text/pom.xml
+++ b/message/message-text/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-text
jar
diff --git a/message/message-web/README.md b/message/message-web/README.md
index 650ef90ca5..a0805e9922 100644
--- a/message/message-web/README.md
+++ b/message/message-web/README.md
@@ -138,7 +138,7 @@ if( assrt.expected().request() instanceof WebSequence
response = results.process( driver );
}
```
-[Snippet context](../../example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java#L156-L167,156-167)
+[Snippet context](../../example/app-itest/src/test/java/com/mastercard/test/flow/example/app/itest/IntegrationTest.java#L114-L125,114-125)
diff --git a/message/message-web/pom.xml b/message/message-web/pom.xml
index 3b142d4666..897c30826c 100644
--- a/message/message-web/pom.xml
+++ b/message/message-web/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-web
jar
diff --git a/message/message-xml/pom.xml b/message/message-xml/pom.xml
index 517d9af2d3..bb0c9b3f8e 100644
--- a/message/message-xml/pom.xml
+++ b/message/message-xml/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
message
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message-xml
jar
diff --git a/message/pom.xml b/message/pom.xml
index 16cc1e2a80..d85a78261c 100644
--- a/message/pom.xml
+++ b/message/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
message
pom
diff --git a/model/pom.xml b/model/pom.xml
index a6f2184aa6..26388864a5 100644
--- a/model/pom.xml
+++ b/model/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
model
jar
diff --git a/pom.xml b/pom.xml
index f8f16b80ab..95ccdb6ec0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
pom
flow
Testing framework
@@ -64,7 +64,8 @@
exercise due to living in a headless environment, so... -->
**/example/**/*.java,
**/com/mastercard/test/flow/assrt/filter/gui/*.java,
- **/com/mastercard/test/flow/validation/coppice/**/*.java
+ **/com/mastercard/test/flow/validation/coppice/**/*.java,
+ **/com/mastercard/test/flow/report/duct/SystrayGui.java
@@ -400,6 +401,7 @@
+
coverage
@@ -469,7 +471,7 @@
true
- true
+ true
diff --git a/report/README.md b/report/README.md
index df2c12a282..e71016bafc 100644
--- a/report/README.md
+++ b/report/README.md
@@ -8,6 +8,7 @@ Visualising assertion results
* [../flow](https://github.com/Mastercard/flow) Testing framework
+ * [duct](duct) Report server
* [report-core](report-core) Report input/output
* [report-ng](report-ng) Report webapp
diff --git a/report/duct/README.md b/report/duct/README.md
new file mode 100644
index 0000000000..530f8961ad
--- /dev/null
+++ b/report/duct/README.md
@@ -0,0 +1,53 @@
+
+
+# duct
+
+Report server
+
+[![javadoc](https://javadoc.io/badge2/com.mastercard.test.flow/duct/javadoc.svg)](https://javadoc.io/doc/com.mastercard.test.flow/duct)
+
+ * [../report](..) Visualising assertion results
+
+
+
+Viewing flow execution reports by browsing the filesystem is convenient, but you miss out on the functionality that requires AJAX calls, e.g.:
+ * The model diff tool
+ * The basis diff view on the detail pages
+ * The system diagram on the index
+
+Duct is a standalone executable that sits in the system tray and runs an HTTP server to which execution reports can be added.
+It will keep running as along as someone is viewing the index or a served report, and then shut down after 90 seconds of non-use.
+
+## Usage
+
+After [importing the `bom`](../../bom):
+
+```xml
+
+
+ com.mastercard.test.flow
+ duct
+
+```
+
+When running your test, set system property `mctf.report.serve=true` to have reports (if any are produced) viewed via a duct instance rather than the filesystem.
+
+## GUI
+
+Right-click the system tray icon to:
+ * `Index` - View duct's index page. Served reports will be listed here
+ * `Add...` - Choose a directory in which to search (recursively). All reports found will be added to the index and opened in the browser
+ * `Clear` - Removes all served reports
+ * `Logs` - Opens the directory where duct's log file is written
+ * `Exit` - Shut duct down.
+
+## HTTP
+
+Duct's server runs at port `2276`, and offers the following endpoints:
+
+ * `/heartbeat` - Send a `GET` request to extend duct's lifespan by 90 seconds
+ * `/add` - Send a `POST` request where the request body is the absolute path of an execution report. The report will be added to the index and the response body will contain the path under `http://127.0.0.1:2276` to browse it
+ * `/list` - Send a `GET` request to retrieve a JSON summary of served reports
+ * `/shutdown` - Send a `POST` request to shut duct down.
+
+Duct is only accessible on loopback addresses, i.e.: `http://127.0.0.1:2276`, `http://localhost:2276` and `http://[::1]:2276`.
diff --git a/report/duct/pom.xml b/report/duct/pom.xml
new file mode 100644
index 0000000000..8ee15d7834
--- /dev/null
+++ b/report/duct/pom.xml
@@ -0,0 +1,95 @@
+
+
+ 4.0.0
+
+ com.mastercard.test.flow
+ report
+ 1.1.0-SNAPSHOT
+
+ duct
+ jar
+ Report server
+
+
+
+
+
+ com.sparkjava
+ spark-core
+
+
+
+ org.slf4j
+ slf4j-api
+
+
+
+
+
+
+ ${project.groupId}
+ report-core
+ ${project.version}
+
+
+
+
+ org.slf4j
+ slf4j-simple
+
+
+
+ org.junit.jupiter
+ junit-jupiter
+ test
+
+
+
+ org.mockito
+ mockito-core
+ test
+
+
+
+
+
+
+
+
+ org.pitest
+ pitest-maven
+
+
+
+ 75
+ 85
+
+ com.mastercard.test.flow.report.duct.SystrayGui
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+
+ false
+
+ true
+
+ true
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Duct.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Duct.java
new file mode 100644
index 0000000000..7601ba36f3
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Duct.java
@@ -0,0 +1,323 @@
+package com.mastercard.test.flow.report.duct;
+
+import static com.mastercard.test.flow.report.FailureSink.SILENT;
+import static java.util.stream.Collectors.joining;
+
+import java.awt.GraphicsEnvironment;
+import java.io.File;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.prefs.Preferences;
+import java.util.stream.Stream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mastercard.test.flow.report.FailureSink;
+import com.mastercard.test.flow.report.LocalBrowse;
+import com.mastercard.test.flow.report.Reader;
+import com.mastercard.test.flow.report.Writer;
+import com.mastercard.test.flow.report.data.Index;
+import com.mastercard.test.flow.report.duct.HttpClient.Response;
+import com.mastercard.test.flow.util.Option;
+
+/**
+ * An application that lives in the system tray and serves flow reports.
+ */
+public class Duct {
+
+ /**
+ * Will be supplied with diagnostic data for duct initialisation failures. This
+ * framework does not assume that clients use a logging framework, and it tries
+ * to keep silent on stdout. This class uses slf4j for the bulk of
+ * operations, but those will be running in a different process to the test. The
+ * interaction between the test and the duct process (where we can't use slf4j)
+ * does a bunch of failure-prone things though, so it's nice to have the option
+ * of seeing the issues when you're wondering why your report is not being
+ * served.
+ */
+ private static FailureSink debug = SILENT;
+
+ /**
+ * Allows insight into failures of duct launch behaviour
+ *
+ * @param sink Will be supplied with duct launch failure diagnostics
+ */
+ public static void debuggingTo( FailureSink sink ) {
+ debug = sink;
+ }
+
+ /**
+ * Allows control over whether a duct gui is shown or not
+ */
+ public static final Option GUI_SUPPRESS = new Option.Builder()
+ .property( "mctf.suppress.duct.gui" )
+ .description( "Supply 'true' to suppress the duct gui" );
+
+ /**
+ * The preference name where we save our index directories
+ */
+ static final String SERVED_REPORT_PATHS_PREF = "served_report_paths";
+ /**
+ * Our preferences object
+ */
+ static final Preferences PREFS = Preferences.userNodeForPackage( Duct.class );
+
+ /**
+ * Application entrypoint
+ *
+ * @param args List of report paths to serve and browse
+ */
+ public static void main( String... args ) {
+ Duct duct = new Duct();
+ duct.start();
+ Stream.of( args )
+ .map( Paths::get )
+ .map( Path::toAbsolutePath )
+ .map( duct::add )
+ .filter( Objects::nonNull )
+ .forEach( served -> LocalBrowse.WITH_AWT.to( served, debug ) );
+ }
+
+ /**
+ * Makes a best-effort attempt at serving a report via {@link Duct} and opening
+ * a browser to it. This might involve starting a fresh instance of the duct
+ * application. It might fail silently
+ *
+ * @param report The report directory to serve
+ */
+ public static void serve( Path report ) {
+ // try adding via http request
+ URL added = tryAdd( report );
+ if( added != null ) {
+ // there's an existing instance!
+ LocalBrowse.WITH_AWT.to( added, debug );
+ }
+ else {
+ Spawn.launchFor( report, debug );
+ }
+ }
+
+ /**
+ * Attempts to add a report to an existing duct instance
+ *
+ * @return The URL of the served report, or null
if the request
+ * failed, perhaps because there was no existing duct instance
+ */
+ private static URL tryAdd( Path report ) {
+ Response res = HttpClient.request(
+ "http://localhost:" + PORT + "/add",
+ "POST",
+ report.toAbsolutePath().toString() );
+
+ if( res.code != 200 ) {
+ debug.log( "Unsuccessful addition response\n:{}", res );
+ return null;
+ }
+
+ if( !res.body.matches( "[\\w/]+" ) ) {
+ debug.log( "Declining to browse dubious path '{}", res.body );
+ return null;
+ }
+
+ try {
+ return new URL( String.format( "http://localhost:%s/%s", PORT, res.body ) );
+ }
+ catch( Exception e ) {
+ debug.log( "Failed to parse '{}' as a url", res.body, e );
+ return null;
+ }
+ }
+
+ /**
+ * How long a {@link Duct} instance will live without heartbeat requests
+ */
+ private static final Duration LIFESPAN = Duration.of( 90, ChronoUnit.SECONDS );
+
+ /**
+ * The port that {@link Duct} will serve on
+ */
+ public static final int PORT = 2276;
+
+ /**
+ * The directory that holds our index application and log file
+ */
+ static final Path INDEX_DIRECTORY = Paths.get( System.getProperty( "java.io.tmpdir" ) )
+ .resolve( "mctf_duct" );
+
+ private static final Logger LOG;
+ static {
+ // logger initialisation has to happen *after* the index directory is known
+ try {
+ Files.createDirectories( INDEX_DIRECTORY );
+ System.setProperty( "org.slf4j.simpleLogger.logFile",
+ INDEX_DIRECTORY.resolve( "log.txt" ).toAbsolutePath().toString() );
+ LOG = LoggerFactory.getLogger( Duct.class );
+
+ LOG.info( "Creating index files" );
+ Writer.writeDuctIndex( INDEX_DIRECTORY );
+ }
+ catch( Exception e ) {
+ throw new IllegalStateException( "Failed to create index directory", e );
+ }
+ }
+
+ private final Gui gui;
+ private final Server server = new Server( this, PORT );
+ private Instant expiry = Instant.now();
+ private Map index = new HashMap<>();
+
+ /**
+ * Constructs a new {@link Duct} instance
+ */
+ public Duct() {
+ if( GUI_SUPPRESS.isTrue() || GraphicsEnvironment.isHeadless() ) {
+ gui = new HeadlessGui();
+ }
+ else {
+ gui = new SystrayGui( this );
+ }
+ }
+
+ /**
+ * Starts duct. The GUI will be shown and the server kicked off
+ */
+ public void start() {
+ gui.show();
+
+ server.start();
+ // map the index page routes
+ server.map( "/", INDEX_DIRECTORY );
+
+ // load the saved report directories
+ Stream.of( PREFS.get( SERVED_REPORT_PATHS_PREF, "" )
+ .split( File.pathSeparator ) )
+ .filter( s -> !s.isEmpty() )
+ .map( Paths::get )
+ .forEach( p -> index.put( p, null ) );
+
+ reindex();
+
+ expiry = Instant.now().plus( LIFESPAN );
+ new Reaper( this ).start();
+ }
+
+ /**
+ * Shuts down the server and hides the GUI. The JVM will be free to exit after
+ * this.
+ */
+ public void stop() {
+ server.stop();
+ gui.hide();
+ }
+
+ /**
+ * Extends the lifespan
+ *
+ * @return the new expiry
+ */
+ public Instant heartbeat() {
+ expiry = Instant.now().plus( LIFESPAN );
+ LOG.debug( "beep! life extended to {}", expiry );
+ return expiry;
+ }
+
+ /**
+ * Gets the time at which duct should shut down
+ *
+ * @return The expiry time
+ */
+ Instant expiry() {
+ return expiry;
+ }
+
+ /**
+ * Adds a report to be served
+ *
+ * @param source The report directory
+ * @return The served report path, or null
on failure
+ */
+ public String add( Path source ) {
+ heartbeat();
+
+ if( !Reader.isReportDir( source ) ) {
+ LOG.error( "{} is not a report", source );
+ return null;
+ }
+
+ LOG.info( "Adding {}", source );
+
+ try {
+ Index idx = new Reader( source ).read();
+
+ String servedPath = String.format( "/%s/", source.toString().replaceAll( "\\W+", "_" ) );
+ server.map( servedPath, source );
+ index.put( source, new ReportSummary( idx, servedPath ) );
+
+ PREFS.put( SERVED_REPORT_PATHS_PREF, index.keySet().stream()
+ .map( Path::toString )
+ .collect( joining( File.pathSeparator ) ) );
+
+ return servedPath;
+ }
+ catch( Exception e ) {
+ LOG.error( "Failed to add {}", source, e );
+ return null;
+ }
+ }
+
+ /**
+ * @return The port that {@link Duct} is serving on
+ */
+ int port() {
+ return server.port();
+ }
+
+ /**
+ * Clears the index
+ */
+ public void clearIndex() {
+ index.keySet().forEach( server::unmap );
+ index.clear();
+ PREFS.remove( SERVED_REPORT_PATHS_PREF );
+ }
+
+ /**
+ * Regenerates the served index list
+ */
+ public void reindex() {
+ LOG.info( "Regenerating index" );
+ List dirs = new ArrayList<>( index.keySet() );
+ List toRemove = new ArrayList<>();
+
+ // try to remap each of our existing reports
+ dirs.forEach( dir -> {
+ if( add( dir ) == null ) {
+ // if they failed to map then we should remove it from the index
+ toRemove.add( dir );
+ }
+ } );
+
+ toRemove.forEach( index::remove );
+ }
+
+ /**
+ * Gets a summary of served reports
+ *
+ * @return served report summaries
+ */
+ Collection index() {
+ return index.values();
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Gui.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Gui.java
new file mode 100644
index 0000000000..976b126ebb
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Gui.java
@@ -0,0 +1,17 @@
+package com.mastercard.test.flow.report.duct;
+
+/**
+ * Interface for UI components that offer control of {@link Duct}
+ */
+interface Gui {
+
+ /**
+ * Displays the GUI
+ */
+ void show();
+
+ /**
+ * Hides the GUI
+ */
+ void hide();
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HeadlessGui.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HeadlessGui.java
new file mode 100644
index 0000000000..b95d298687
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HeadlessGui.java
@@ -0,0 +1,18 @@
+package com.mastercard.test.flow.report.duct;
+
+/**
+ * An empty {@link Gui} for use in headless environments
+ */
+public class HeadlessGui implements Gui {
+
+ @Override
+ public void show() {
+ // nothing to show
+ }
+
+ @Override
+ public void hide() {
+ // nothing to hide
+ }
+
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HttpClient.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HttpClient.java
new file mode 100644
index 0000000000..e2acd185b6
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/HttpClient.java
@@ -0,0 +1,129 @@
+package com.mastercard.test.flow.report.duct;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.function.Function;
+
+/**
+ * A very simple HTTP client
+ */
+class HttpClient {
+
+ private HttpClient() {
+ // no instances
+ }
+
+ /**
+ * Does a HTTP request
+ *
+ * @param url request URL
+ * @param method request method
+ * @param body request body
+ * @return The response body string
+ */
+ static Response request( String url, String method, String body ) {
+ return request( url, method, body, b -> new String( b, UTF_8 ) );
+ }
+
+ /**
+ * Does a HTTP request
+ *
+ * @param response body type
+ * @param url request URL
+ * @param method request method
+ * @param body request body
+ * @param parse How to parse the response body
+ * @return The parsed response, which will have response code -1 in the event of
+ * failure
+ */
+ static Response request( String url, String method, String body,
+ Function parse ) {
+ try {
+ HttpURLConnection connection = (HttpURLConnection) new URL( url )
+ .openConnection();
+ connection.setRequestMethod( method );
+ connection.setDoInput( true );
+ connection.setConnectTimeout( 3000 );
+ connection.setReadTimeout( 3000 );
+
+ if( body != null ) {
+ connection.setDoOutput( true );
+ try( OutputStream out = connection.getOutputStream() ) {
+ out.write( body.getBytes( UTF_8 ) );
+ }
+ }
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ byte[] buff = new byte[1024];
+ int read = 0;
+
+ try( InputStream in = response( connection ) ) {
+ while( (read = in.read( buff )) != -1 ) {
+ baos.write( buff, 0, read );
+ }
+ }
+
+ return new Response<>( connection.getResponseCode(), baos.toByteArray(), parse );
+ }
+ catch( IOException e ) {
+ return new Response<>( -1, e.getMessage().getBytes( UTF_8 ), parse );
+ }
+ }
+
+ /**
+ * Response details
+ *
+ * @param parsed body type
+ */
+ static class Response {
+ /**
+ * Response code
+ */
+ int code;
+ /**
+ * body text
+ */
+ final String raw;
+ /**
+ * parsed body
+ */
+ final T body;
+
+ /**
+ * @param code Response code
+ * @param data body bytes
+ * @param parse how to parse the body
+ */
+ Response( int code, byte[] data, Function parse ) {
+ this.code = code;
+ String r = new String( data, UTF_8 );
+ T parsed = null;
+ try {
+ parsed = parse.apply( data );
+ }
+ catch( Exception e ) {
+ r += "\nParse failure : " + e.getMessage();
+ }
+ body = parsed;
+ raw = r;
+ }
+
+ @Override
+ public String toString() {
+ return "rc: " + code + "\n" + raw;
+ }
+ }
+
+ private static InputStream response( HttpURLConnection conn ) throws IOException {
+ if( conn.getResponseCode() < HttpURLConnection.HTTP_BAD_REQUEST ) {
+ return conn.getInputStream();
+ }
+ return conn.getErrorStream();
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Reaper.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Reaper.java
new file mode 100644
index 0000000000..2c2e4ec061
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Reaper.java
@@ -0,0 +1,78 @@
+package com.mastercard.test.flow.report.duct;
+
+import java.time.Duration;
+import java.time.Instant;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A {@link Thread} that monitors {@link Duct#expiry()}. When the expiry has
+ * been reached the {@link Duct} is shut down
+ */
+class Reaper extends Thread {
+ private static final Logger LOG = LoggerFactory.getLogger( Reaper.class );
+
+ private final Duct duct;
+
+ private Supplier now = Instant::now;
+
+ private Consumer sleep = delay -> {
+ try {
+ LOG.debug( "Sleeping for a bit over {}", delay );
+ // if we sleep for *exactly* the time left then we get a busy-loop of
+ // zero-duration sleeps right before dying. Allowing 10ms grace for another
+ // heartbeat to come in avoids pointless log noise
+ Thread.sleep( delay.toMillis() + 10 );
+ }
+ catch( InterruptedException e ) {
+ LOG.warn( "unexpected interruption", e );
+ Thread.currentThread().interrupt();
+ }
+ };
+
+ /**
+ * @param duct The {@link Duct} instance to control
+ */
+ Reaper( Duct duct ) {
+ super( "duct reaper" );
+ this.duct = duct;
+ setDaemon( true );
+ }
+
+ @Override
+ public void run() {
+ Duration delay = Duration.between( now.get(), duct.expiry() );
+ while( !delay.isNegative() ) {
+ sleep.accept( delay );
+ delay = Duration.between( now.get(), duct.expiry() );
+ }
+
+ LOG.warn( "Expiry breached by {}, shutting down duct", delay.abs() );
+ duct.stop();
+ }
+
+ /**
+ * For use in unit tests, overrides the default wall-clock behaviours
+ *
+ * @param n How to find out what time it is
+ * @param s How to wait for a defined duration
+ * @return this
+ */
+ Reaper withClock( Supplier n, Consumer s ) {
+ now = n;
+ sleep = s;
+ return this;
+ }
+
+ /**
+ * For use in unit tests, returns the current sleep function
+ *
+ * @return the sleep function
+ */
+ Consumer sleep() {
+ return sleep;
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/ReportSummary.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/ReportSummary.java
new file mode 100644
index 0000000000..50b5be6cb8
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/ReportSummary.java
@@ -0,0 +1,111 @@
+package com.mastercard.test.flow.report.duct;
+
+import java.util.function.BiFunction;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.mastercard.test.flow.Flow;
+import com.mastercard.test.flow.report.Writer;
+import com.mastercard.test.flow.report.data.Index;
+import com.mastercard.test.flow.report.data.Meta;
+
+/**
+ * Summary of content from about a served report
+ */
+public class ReportSummary {
+
+ /**
+ * The report metadata
+ */
+ @JsonProperty("meta")
+ public final Meta meta;
+ /**
+ * Summary of {@link Flow} assertion outcome
+ */
+ @JsonProperty("counts")
+ public final Counts counts;
+ /**
+ * The path portion of the report's URL
+ */
+ @JsonProperty("path")
+ public final String path;
+
+ /**
+ * @param meta The report metadata
+ * @param counts Summary of {@link Flow} assertion outcome
+ * @param path The path portion of the report's URL
+ */
+ public ReportSummary(
+ @JsonProperty("meta") Meta meta,
+ @JsonProperty("counts") Counts counts,
+ @JsonProperty("path") String path ) {
+ this.meta = meta;
+ this.counts = counts;
+ this.path = path;
+ }
+
+ /**
+ * @param index The index to summarise
+ * @param path The path where the index was read from
+ */
+ public ReportSummary( Index index, String path ) {
+ this( index.meta, new Counts( index ), path );
+ }
+
+ /**
+ * Summary of {@link Flow} assertion outcome
+ */
+ public static class Counts {
+ /**
+ * The count of flows that passed assertion
+ */
+ @JsonProperty("pass")
+ public final int pass;
+ /**
+ * The count of flows that failed assertion
+ */
+ @JsonProperty("fail")
+ public final int fail;
+ /**
+ * The count of flows that were skipped
+ */
+ @JsonProperty("skip")
+ public final int skip;
+ /**
+ * The count of flows that suffered execution errors
+ */
+ @JsonProperty("error")
+ public final int error;
+
+ /**
+ * @param pass The count of flows that passed assertion
+ * @param fail The count of flows that failed assertion
+ * @param skip The count of flows that were skipped
+ * @param error The count of flows that suffered execution errors
+ */
+ public Counts(
+ @JsonProperty("pass") int pass,
+ @JsonProperty("fail") int fail,
+ @JsonProperty("skip") int skip,
+ @JsonProperty("error") int error ) {
+ this.pass = pass;
+ this.fail = fail;
+ this.skip = skip;
+ this.error = error;
+ }
+
+ private static final BiFunction extract = ( idx, tag ) -> (int) idx.entries.stream()
+ .filter( e -> e.tags.contains( tag ) ).count();
+
+ /**
+ * @param index The index to extract the counts from
+ */
+ public Counts( Index index ) {
+ this(
+ extract.apply( index, Writer.PASS_TAG ),
+ extract.apply( index, Writer.FAIL_TAG ),
+ extract.apply( index, Writer.SKIP_TAG ),
+ extract.apply( index, Writer.ERROR_TAG ) );
+ }
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Search.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Search.java
new file mode 100644
index 0000000000..fa672436b9
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Search.java
@@ -0,0 +1,106 @@
+package com.mastercard.test.flow.report.duct;
+
+import java.io.IOException;
+import java.io.UncheckedIOException;
+import java.nio.file.FileVisitResult;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.SimpleFileVisitor;
+import java.nio.file.attribute.BasicFileAttributes;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Stream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mastercard.test.flow.report.Reader;
+
+/**
+ * Finds reports on the filesystem
+ */
+class Search {
+
+ private static final Path SRC_MAIN_JAVA = Paths.get( "src", "main", "java" );
+ private static final Path SRC_TEST_JAVA = Paths.get( "src", "test", "java" );
+
+ private Search() {
+ // no instances
+ }
+
+ /**
+ * Walks a directory structure to find the reports it contains
+ *
+ * @param root The directory to search
+ * @return A stream of the report paths that lie under the directory
+ */
+ static Stream find( Path root ) {
+ ReportForager rf = new ReportForager();
+ try {
+ Files.walkFileTree( root, rf );
+ }
+ catch( IOException e ) {
+ throw new UncheckedIOException( "Search of " + root + "failed", e );
+ }
+ return rf.reports();
+ }
+
+ private static class ReportForager extends SimpleFileVisitor {
+
+ private static final Logger LOG = LoggerFactory.getLogger( ReportForager.class );
+
+ private List found = new ArrayList<>();
+
+ ReportForager() {
+ }
+
+ @Override
+ public FileVisitResult preVisitDirectory( Path dir, BasicFileAttributes attrs )
+ throws IOException {
+
+ if( Reader.isReportDir( dir ) ) {
+ found.add( dir );
+ // we're not expecting nested reports, so don't look deeper
+ return FileVisitResult.SKIP_SUBTREE;
+ }
+
+ // these directory structures tend to be very large and devoid of execution
+ // reports. Let's skip them.
+ if( isJavaSourceRoot( dir ) ) {
+ LOG.info( "Skipping java source tree {}", dir );
+ return FileVisitResult.SKIP_SUBTREE;
+ }
+ if( isNodeModules( dir ) ) {
+ LOG.info( "Skipping node modules tree {}", dir );
+ return FileVisitResult.SKIP_SUBTREE;
+ }
+
+ return super.preVisitDirectory( dir, attrs );
+ }
+
+ public Stream reports() {
+ return found.stream();
+ }
+ }
+
+ /**
+ * @param path a path
+ * @return true
if that path looks like it might be the root of a
+ * java source tree
+ */
+ static boolean isJavaSourceRoot( Path path ) {
+ return path.endsWith( SRC_MAIN_JAVA )
+ || path.endsWith( SRC_TEST_JAVA );
+ }
+
+ /**
+ * @param path a path
+ * @return true
if that path looks like it might contain NPM
+ * dependencies
+ */
+ static boolean isNodeModules( Path path ) {
+ return path.endsWith( "node_modules" );
+ }
+
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Server.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Server.java
new file mode 100644
index 0000000000..f2e6570bba
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Server.java
@@ -0,0 +1,251 @@
+package com.mastercard.test.flow.report.duct;
+
+import static com.mastercard.test.flow.report.Writer.DETAIL_DIR_NAME;
+import static java.util.Collections.emptySet;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.Stream;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
+import spark.Filter;
+import spark.Route;
+import spark.Service;
+import spark.Spark;
+import spark.resource.ExternalResource;
+import spark.staticfiles.MimeType;
+
+/**
+ * Handles the webser functionality
+ */
+class Server {
+ private static final Logger LOG = LoggerFactory.getLogger( Server.class );
+ private static final ObjectMapper JSON = new ObjectMapper()
+ .enable( SerializationFeature.INDENT_OUTPUT );
+
+ /**
+ * Restricts our server to only working with local clients. Duct will merrily
+ * serve up the contents of directories, so we have to be mindful of security
+ * issues and avoid providing a data exfiltration route. Hence we're going to
+ * restrict it so that it only responds to requests coming from localhost
+ */
+ private static final Filter LOCAL_ORIGIN_ONLY = ( request, response ) -> {
+ // SECURITY-CRITICAL BEHAVIOUR
+ try {
+ InetAddress addr = InetAddress.getByName( request.ip() );
+ if( !addr.isLoopbackAddress() ) {
+ if( LOG.isWarnEnabled() ) {
+ LOG.warn( "Rejecting non-local request from {} to {}",
+ addr, request.pathInfo() );
+ }
+ Spark.halt( 403 );
+ }
+ }
+ catch( UnknownHostException | SecurityException e ) {
+ LOG.error( "Failed to determine origin of {}, defaulting to rejection",
+ request.ip(), e );
+ Spark.halt( 403 ); // never let them see you bleed
+ }
+ // Think carefully before changing this!
+ };
+
+ private final Service spark;
+ private final Map> routes = new HashMap<>();
+
+ /**
+ * @param duct The instance to control
+ * @param port The port to serve on
+ */
+ Server( Duct duct, int port ) {
+ spark = Service.ignite()
+ .port( port );
+
+ // SECURITY-CRITICAL BEHAVIOUR
+ spark.before( LOCAL_ORIGIN_ONLY );
+ // Think carefully before changing this!
+
+ spark.get( "/heartbeat",
+ ( req, res ) -> "Expiry at " + duct.heartbeat() );
+
+ spark.post( "/shutdown",
+ ( req, res ) -> {
+ duct.stop();
+ return "Shutting down";
+ } );
+
+ spark.post( "/add",
+ ( req, res ) -> {
+ Path reportDir = Paths.get( req.body().trim() );
+ return duct.add( reportDir );
+ } );
+
+ spark.get( "/list",
+ ( req, res ) -> duct.index(), JSON::writeValueAsString );
+ }
+
+ /**
+ * Starts the server
+ */
+ void start() {
+ LOG.info( "Starting server" );
+ spark.awaitInitialization();
+ }
+
+ /**
+ * Stops the server
+ */
+ void stop() {
+ LOG.info( "Stopping server" );
+ spark.stop();
+ }
+
+ /**
+ * Stops the server and doesn't return untill it's dead
+ */
+ void awaitStop() {
+ stop();
+ spark.awaitStop();
+ }
+
+ /**
+ * @return The port that the server is running on
+ */
+ int port() {
+ return spark.port();
+ }
+
+ /**
+ * Adds routes to serve the files in the supplied directory. The mapping
+ * behaviour is specific to the report structure:
+ *
+ * - An
index.html
file at the root
+ * - A
res
directory that already contains all the files it ever
+ * will
+ * - a
detail
directory that exists, but there might be more
+ * details files added to it later.
+ *
+ *
+ * @param path The base request path
+ * @param dir The directory that holds the files
+ */
+ void map( String path, Path dir ) {
+
+ LOG.info( "Mapping {}", dir );
+
+ // clear any lingering paths for that directory
+ unmap( dir );
+ Set paths = new TreeSet<>();
+
+ String requestPath = path + dir.relativize( dir ).toString().replace( '\\', '/' );
+ Path idxp = dir.resolve( "index.html" );
+
+ if( !Files.exists( idxp ) ) {
+ LOG.warn( "No index found at {}", idxp );
+ return;
+ }
+
+ Route idxr = respondWithFileBytes( idxp );
+ // special treatment for the index: serve it when the directory is requested
+ Stream.of( requestPath, requestPath + "index.html" )
+ .forEach( getPath -> {
+ LOG.info( "Routing GET {} to {}", getPath, idxp );
+ paths.add( getPath );
+ spark.get( getPath, idxr );
+ } );
+
+ Path resp = dir.resolve( "res" );
+ if( Files.isDirectory( resp ) ) {
+ try( Stream resFiles = Files.list( resp ) ) {
+ resFiles
+ .filter( Files::isRegularFile )
+ .filter( f -> f.toString().endsWith( ".js" )
+ || f.endsWith( "favicon.ico" )
+ || f.toString().endsWith( ".css" ) )
+ .map( p -> {
+ String getPath = requestPath + "res/" + p.getFileName().toString();
+ LOG.debug( "Routing GET {} to {}", getPath, idxp );
+ spark.get( getPath, respondWithFileBytes( p ) );
+ return getPath;
+ } )
+ .forEach( paths::add );
+ }
+ catch( IOException ioe ) {
+ LOG.error( "Failed to map resource directory {}", resp, ioe );
+ }
+ }
+
+ Path detp = dir.resolve( DETAIL_DIR_NAME );
+ if( Files.isDirectory( detp ) ) {
+ String getPath = requestPath + DETAIL_DIR_NAME + "/*";
+ LOG.debug( "Routing GET {} to detail files in {}", getPath, detp );
+ paths.add( getPath );
+ spark.get( getPath, ( req, res ) -> {
+ if( req.splat()[0].matches( "[A-F0-9]{32}.html" ) ) {
+ Path file = dir.resolve( DETAIL_DIR_NAME ).resolve( req.splat()[0] );
+ return respondWithFileBytes( file ).handle( req, res );
+ }
+ LOG.warn( "Rejecting request for non-detail file {}", req.pathInfo() );
+ res.status( 404 );
+ return "";
+ } );
+ }
+
+ // save the mapped paths so we can unmap them later
+ routes.put( dir, paths );
+ LOG.info( "Mapped {} paths under {}", paths.size(), path );
+ }
+
+ private static Route respondWithFileBytes( Path f ) {
+ return ( req, res ) -> {
+ if( !Files.isRegularFile( f ) ) {
+ res.status( 404 );
+ return "";
+ }
+
+ res.header( "Content-Type", MimeType.fromResource(
+ new ExternalResource( f.toString() ) ) );
+
+ byte[] buff = new byte[8192];
+ try( InputStream is = Files.newInputStream( f );
+ OutputStream os = res.raw().getOutputStream(); ) {
+ int read;
+ while( (read = is.read( buff )) != -1 ) {
+ os.write( buff, 0, read );
+ }
+ }
+ catch( IOException ioe ) {
+ LOG.error( "Failed GET {} {}", req.pathInfo(), f, ioe );
+ res.status( 500 );
+ }
+ return null; // vestigial, we've already written the body
+ };
+ }
+
+ /**
+ * Removes the routes that were serving the files in a directory
+ *
+ * @param dir The directory that holds the files
+ */
+ void unmap( Path dir ) {
+ routes.getOrDefault( dir, emptySet() )
+ .forEach( path -> {
+ LOG.debug( "unmapping {}", path );
+ spark.unmap( path );
+ } );
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Spawn.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Spawn.java
new file mode 100644
index 0000000000..ce29c87f81
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/Spawn.java
@@ -0,0 +1,137 @@
+package com.mastercard.test.flow.report.duct;
+
+import static com.mastercard.test.flow.report.FailureSink.SILENT;
+import static java.util.stream.Collectors.joining;
+import static java.util.stream.Collectors.toList;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.nio.file.Path;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Stream;
+
+import com.mastercard.test.flow.report.FailureSink;
+import com.mastercard.test.flow.report.LocalBrowse;
+
+/**
+ * Encapsulates the details of spawning a new JVM in which to run a {@link Duct}
+ * instance
+ */
+class Spawn {
+
+ private Spawn() {
+ // no instances
+ }
+
+ /**
+ * Launches a new JVM, running {@link Duct#main(String...)}, to which a report
+ * path is supplied
+ *
+ * @param report The report that we wishto new {@link Duct} instance to serve
+ * @param debug What to do with failure diagnostics
+ */
+ static void launchFor( Path report, FailureSink debug ) {
+ // we'll have to spawn our own instance
+ ProcessBuilder pb = new ProcessBuilder( Stream.of(
+ "java",
+ // Immediately after launch duct will try to open a browser, so we need to clone
+ // these browser-opening property in the new JVM
+ LocalBrowse.SUPPRESS.commandLineArgument(),
+ LocalBrowse.XDG_OPEN_FALLBACK.commandLineArgument(),
+ // re-use the current JVM's classpath. It's running this class, so it should
+ // also have the dependencies we need. The classpath will be bigger than duct
+ // strictly needs, but the cost of that is negligible
+ "-cp", getClassPath(),
+ // invoke this class's main method
+ Duct.class.getName(),
+ // pass the report path on the commandline - the above main method will take
+ // care of adding and browsing it
+ report.toAbsolutePath().toString() )
+ .filter( Objects::nonNull )
+ .collect( toList() ) );
+
+ launch( pb, debug );
+ }
+
+ /**
+ * Launches a process, and if our {@link #DEBUG} is doing anything, pipes the
+ * stdout content from that process intto it
+ *
+ * @param pb The process to launch
+ */
+ private static final void launch( ProcessBuilder pb, FailureSink debug ) {
+ if( debug != SILENT ) {
+ pb.redirectErrorStream( true );
+ }
+ try {
+ // this process will persist after the demise of the current JVM
+ Process p = pb.start();
+
+ if( debug != SILENT ) {
+ Thread t = new Thread( () -> {
+ try( InputStreamReader isr = new InputStreamReader( p.getInputStream() );
+ BufferedReader br = new BufferedReader( isr ) ) {
+ String line = null;
+ while( (line = br.readLine()) != null ) {
+ debug.log( "duct launch stdout : {}", line );
+ }
+
+ debug.log( "duct stdout ended! Command was:" );
+ debug.log( pb.command().stream().collect( joining( " " ) ) );
+ debug.log( "exit code {}", p.exitValue() );
+ }
+ catch( Exception e ) {
+ debug.log( "duct stdout capture failure!", e );
+ }
+ }, "stream printer" );
+ t.setDaemon( true );
+ t.start();
+ }
+ }
+ catch( IOException e ) {
+ debug.log( "Failed to launch:\n{}",
+ pb.command().stream().collect( joining( " " ) ),
+ e );
+ }
+ }
+
+ /**
+ * Attempts to gets the classpath of the current JVM. You would think that you
+ * could just use the java.class.path
system property, but when
+ * running tests via maven (a really common use-case for us) that
+ * just contains plexus-classworlds.jar
, which is no use to us.
+ * Hence we're reduced to this: ascending the classloader chain and pulling out
+ * any URL that we find. This is all highly platform and VM-dependent
+ * stuff, it's horribly fragile.
+ *
+ * @return The classpath of the current JVM
+ */
+ private static String getClassPath() {
+ List urls = new ArrayList<>();
+ ClassLoader cl = Duct.class.getClassLoader();
+ while( cl != null ) {
+ if( cl instanceof URLClassLoader ) {
+ Collections.addAll( urls, ((URLClassLoader) cl).getURLs() );
+ }
+ cl = cl.getParent();
+ }
+ String cp = urls.stream()
+ .map( URL::getPath )
+ .collect( joining( File.pathSeparator ) );
+
+ if( cp.isEmpty() ) {
+ // The complicated thing didn't work. Let's try the simple thing!
+ cp = System.getProperty( "java.class.path" );
+ }
+
+ return cp;
+ }
+}
diff --git a/report/duct/src/main/java/com/mastercard/test/flow/report/duct/SystrayGui.java b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/SystrayGui.java
new file mode 100644
index 0000000000..8710532ed7
--- /dev/null
+++ b/report/duct/src/main/java/com/mastercard/test/flow/report/duct/SystrayGui.java
@@ -0,0 +1,169 @@
+package com.mastercard.test.flow.report.duct;
+
+import java.awt.AWTException;
+import java.awt.Color;
+import java.awt.Desktop;
+import java.awt.Dimension;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.MenuItem;
+import java.awt.PopupMenu;
+import java.awt.SystemTray;
+import java.awt.TrayIcon;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.prefs.Preferences;
+
+import javax.imageio.ImageIO;
+import javax.swing.JFileChooser;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.mastercard.test.flow.report.LocalBrowse;
+
+/**
+ * Handles the {@link Duct} graphical user interface - the systray icon and the
+ * popup menu
+ */
+class SystrayGui implements Gui {
+
+ private static final String SEARCH_PATH_PREF = "search_path";
+
+ private static final Logger LOG = LoggerFactory.getLogger( SystrayGui.class );
+
+ // https://brand.mastercard.com/brandcenter-ca/branding-requirements/mastercard.html
+ private static final Color MC_RED = new Color( 235, 0, 27 );
+ private static final Color MC_ORANGE = new Color( 255, 95, 0 );
+ private static final Color MC_YELLOW = new Color( 247, 158, 27 );
+
+ private final TrayIcon trayIcon;
+
+ private static final Preferences prefs = Preferences.userNodeForPackage( SystrayGui.class );
+
+ /**
+ * @param duct The {@link Duct} instance to control
+ */
+ SystrayGui( Duct duct ) {
+ trayIcon = new TrayIcon(
+ icon(),
+ "Flow reports",
+ menu( duct ) );
+
+ // manually resize the image so we can use smooth scaling.
+ // TrayIcon.setImageAutoSize does not produce good results
+ Dimension d = trayIcon.getSize();
+ trayIcon.setImage( trayIcon.getImage()
+ .getScaledInstance( d.width, d.height, Image.SCALE_SMOOTH ) );
+ }
+
+ private static Image icon() {
+ Image icon;
+ try {
+ icon = ImageIO.read( Duct.class.getClassLoader().getResource( "duct.png" ) );
+ }
+ catch( Exception e ) {
+ LOG.error( "Failed to read icon", e );
+ // fall back to a trivial mastercard-hued tricolour flag
+ icon = new BufferedImage( 3, 3, BufferedImage.TYPE_INT_ARGB );
+ Graphics g = icon.getGraphics();
+ g.setColor( MC_RED );
+ g.fillRect( 0, 0, 1, 3 );
+ g.setColor( MC_ORANGE );
+ g.fillRect( 1, 0, 1, 3 );
+ g.setColor( MC_YELLOW );
+ g.fillRect( 2, 0, 1, 3 );
+ }
+ return icon;
+ }
+
+ private static PopupMenu menu( Duct duct ) {
+ PopupMenu menu = new PopupMenu();
+ menu.add( index( duct ) );
+ menu.add( add( duct ) );
+ menu.add( clearIndex( duct ) );
+ menu.add( log() );
+ menu.addSeparator();
+ menu.add( exit( duct ) );
+ return menu;
+ }
+
+ private static MenuItem index( Duct duct ) {
+ MenuItem index = new MenuItem( "Index" );
+ index.addActionListener( ev -> LocalBrowse.WITH_AWT.to(
+ "http://localhost:" + duct.port(), LOG::error ) );
+ return index;
+ }
+
+ private static MenuItem add( Duct duct ) {
+ MenuItem add = new MenuItem( "Add..." );
+ add.addActionListener( ev -> {
+ File start = null;
+ try {
+ start = new File( prefs.get( SEARCH_PATH_PREF, System.getProperty( "user.home" ) ) );
+ }
+ catch( Exception e ) {
+ LOG.warn( "Failed to restore search directory", e );
+ }
+
+ JFileChooser chooser = new JFileChooser( start );
+ chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY );
+
+ int result = chooser.showDialog( null, "Find reports" );
+ if( result == JFileChooser.APPROVE_OPTION ) {
+ Path path = chooser.getSelectedFile().toPath();
+ prefs.put( SEARCH_PATH_PREF, path.toAbsolutePath().toString() );
+
+ Search.find( path )
+ .map( duct::add )
+ .forEach( url -> LocalBrowse.WITH_AWT.to( url, LOG::error ) );
+ }
+ } );
+ return add;
+ }
+
+ private static MenuItem clearIndex( Duct duct ) {
+ MenuItem item = new MenuItem( "Clear" );
+ item.addActionListener( ev -> duct.clearIndex() );
+ return item;
+ }
+
+ private static MenuItem log() {
+ MenuItem item = new MenuItem( "Logs" );
+ item.addActionListener(
+ ev -> {
+ try {
+ Desktop.getDesktop().open( Duct.INDEX_DIRECTORY.toFile() );
+ }
+ catch( IOException e ) {
+ LOG.error( "Failed to open log file", e );
+ }
+ } );
+ return item;
+ }
+
+ private static MenuItem exit( Duct duct ) {
+ MenuItem item = new MenuItem( "Exit" );
+ item.addActionListener( ev -> duct.stop() );
+ return item;
+ }
+
+ @Override
+ public void show() {
+ LOG.info( "Showing gui" );
+ try {
+ SystemTray.getSystemTray().add( trayIcon );
+ }
+ catch( AWTException e ) {
+ LOG.error( "Failed to add systray icon", e );
+ }
+ }
+
+ @Override
+ public void hide() {
+ LOG.info( "hiding gui" );
+ SystemTray.getSystemTray().remove( trayIcon );
+ }
+}
diff --git a/report/duct/src/main/resources/duct.drawio.svg b/report/duct/src/main/resources/duct.drawio.svg
new file mode 100644
index 0000000000..8701941349
--- /dev/null
+++ b/report/duct/src/main/resources/duct.drawio.svg
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/report/duct/src/main/resources/duct.png b/report/duct/src/main/resources/duct.png
new file mode 100644
index 0000000000000000000000000000000000000000..fe3d9a3e2085cc910ed13f7b8429fc36a2c9005f
GIT binary patch
literal 5666
zcmeI0c~n!^y1
zCri&x5s3vDXD{~T%GoOvtdm9jRFt3YOs9#GoxM2DbUIraDGc!qUlS5W_d}xusqSmV
zKurf08T@p?q)iMzRp9Qamrevp&kjfVQsH}&WPupiC1+1sd3$QAyVC%~B*{
z!yOI5q~IFAbJ7bIC-KGqQ@Tu)EE7)J`uiBt(_3=|qEw;rWKWtwlg>998w8m`ezGKM
z(tkoU!3~v2fNSVPN!S9ho}H1)q+i${Xy4?I3Nj3b|Am9^B+>PJ@jAohCIy+Y4aVD|
zl64u$0zDy`vsXx#P$Uy9mhzMI=2@V;Kqi!>i^0wlEI}`c*%Gk?1^Wz11~3ZAl%bL}
z0wXBzHxi?nGui$L0U$Cu7`w#KT%N|VWc^ku
zy03x1@U1ev5%LY~k@_Y!=yC&cut?9IsL8*tkMZz70}6^R)zeGoXRPCkc^T4mpjLkc
zHgobR@YmNMMJ$qX4ZtVq8d(~Uzg-1@H#CGs^9*@|SIYmbJq&o)|99eljF)aeXTVDb
z8BI)qx9}Q8Z`1WO`u#1spb+|r^M68DPdZtIf&n6uWK6U(s(*S7{ru;|!~7Vb|69cA
z-oGdAX>8uNh`*uxHgaPb{uXhczb5`44G2^s;~Rjwd;92{`K^gDF$#Rbz_|Pa%#+Fd
zy#_YU17icz3{CYmP9yTSae8`sO&f@LgoF4&!i%oDOp=Fa(9fB$NjIi;QyJC%pvN^qDwB*8P
z_X%
z)z7B1MPpdUy;h_(zs?=o8{D%u@UbK>_w+7Ld0F7bEv*5OJ>}_l_q86)pSSex$b%G4?&XWL-i
zX%1;+@+a5NI4UmKAgbi}%xg#N73g?)16>fEpK3n4$GrnYOhL%_$*IR
zi75k7RnK~Uq6EnyxOC<*^|tLn=}t=f9NzQw6Sm{R4!CFTsp^+gd-JKE*
zt3kym(~_6^=|9to;RXSylt*CaCr!#06dy2l5@;NKy7;UDPI8ZeSAZxHem*&-3yuIoB>B1b7wI79*C$
zJM^YE>nO_Pg7*+SRU_;tajI%uw7`p=1v~O$tXcq=vLHx@=FTMLiVwPupf^H4((m1vq<0ez9&}WsE#X$#m3D?e{N`h)EKy-t
zF?F}*X*!d%X`J{=7*TPBqH4T<%g<4{KBY52&GrkSUMZe58{>A#om)k>fff3`?wA?gkr2rYY=GCQ|ZtBqSu($x>WIJ78@!EfOEy#RPU?Xjo~4|Wt=9-RMzVeQm$x-d
zV}7HlIV=SKrMWNL>q6veI~Jmt^=N;upPRdC9#lZ4dbCHq=kBU{B4-l4I@u2-@v)X)
zPAMQ)d;GBVlKULhalQQZ*%@8Ow^L)yaE$72xFf!&O7lt=_Pu(xVrb(2Ty;6ry8#S-9L+x0Gx#}GwtU-0_yL-2ewpuu=>!r4tdT?+EAmg?<@x^T2_*O{Q+As7BEaHE@&
zeWTAQii21ljAJMh_ulMa6aB1+da$pasq!4qZ)V3Fc;i%4E-eEmW%#-cQS-@P-7f}C
zO9YLM9ynd)?m;Pt_p>LM?mriV)72-x+W^%^Hc*2%CphJkFZMeE?*_MUvkzbde=Q!ifwZ(s
znGaX%>I3r#EQBzU@T04eoIu}c0coY@vr4LT_3o+jfa2tyd+uAw3ALqGKym5ABR#tM
zpw6
z>*&@xMhqiX?mA7t@rwEvGlY{0vSEIXEc9mQlwX7*xW~k>!>iN^?)DCT;z#@=)T#i}EZkL4LLq-fP-=S5r9WgOj&V
zkWfZ^vvnA8?O?#d9Wx;9{iydv0ccFb{!=#b;C}sXPkj;mnJBve?Mz53j9M&W0Oeh&
z2k31}MQurklH7A+_P#wKpsN1sT2Wp7Cy$11fd_(G+#2?>Kv!9@YjhiURxBH?6_JY?
z8Ml`&08#JqzkSFdW(fD2e*unE+LznhbHZ2B23PQ0VJbg(>LqIp+v}KkcC0y$2W^{;
z!bQQ4?mq!h?iTkA@N^VR&PB~)7!-_b-%BH{A76A$zp-`crD2Y>TPy}e@+aD$(xQVa
za=>u}1)ohM#$;~a6AQAGj;aeO7dL+Pxix4#+pykM7|$#f7z@+|#a0a2x$@Kj{XzI*
zYX&*r_udX?a22~^8;19}-FXk_Kx5swl{_Cg{Lf_2m8yWo5_0?LvC_nE_aN$~((_DW
z>5qalf=E!VI$K$9&F#aI(H;Q^9x+c>+5Od_Q!)|D&7II&(_bPP|G96<(Q2xieb*;G
ziy_ax{A(s7=sVYi)7$q;Uwk=Zifr5W$dXASn)Emm6ieq3u#knP3D;4+
zAa%LbohkhHo`eQbyWyQz*&tl%MQ+0^THgoYvw2xv;$|lmR?TSm2qTx)zc?{hYYXj8
ziUO*|d!BEhs0wNrEkzhPtv)Uh;{8y&S`Y{#tFc-*|FT8_ZpOax!jGcLEnYG-Cm$J~
z)fI^4K@Ior&j(P6c?Ea|Hy$yAtIQqBD?sSfb079uG}%*fgR~gAvbuF)
zyy>-jqd_=$^~dUwuSeuk)2Oj`Km_x|*D27IR<&6!L@ILV_^Jg2wb~*F$09>JlPow=
z3^{KnMh@GPAPX|4*$M8O#U!;nXq)Y!yaQJCSZScg|I7ZILHT)e+}2Id?b0t4- new Entry( "desc", Arrays.asList( spec.split( "," ) ), "detail" ) )
+ .collect( toList() ) );
+ String index = INDEX_TEMPLATE
+ .replace( "// START_JSON_DATA\n\n// END_JSON_DATA",
+ ""
+ + "// START_JSON_DATA\n"
+ + JSON.writeValueAsString( idx )
+ + "\n// END_JSON_DATA" )
+ .replace( "\r", "" );
+ Files.write( dir.resolve( Writer.INDEX_FILE_NAME ), index.getBytes( UTF_8 ) );
+ Files.createDirectories( dir.resolve( Writer.DETAIL_DIR_NAME ) );
+ Files.createDirectories( dir.resolve( "res" ) );
+
+ return dir;
+ }
+ catch( IOException e ) {
+ throw new UncheckedIOException( "Failed to create report at " + dir, e );
+ }
+ }
+
+ /**
+ * Polls for a successful
/heartbeat
+ */
+ static void waitForLife( int port ) {
+ long expiry = System.currentTimeMillis() + 5000;
+
+ Response resp;
+ do {
+ if( System.currentTimeMillis() > expiry ) {
+ throw new IllegalStateException( "duct startup failure" );
+ }
+
+ resp = heartbeat( port );
+ try {
+ Thread.sleep( 100 );
+ }
+ catch( InterruptedException e ) {
+ throw new IllegalStateException( e );
+ }
+ }
+ while( resp.code != 200 );
+ }
+
+ /**
+ * Deletes the list of index directories from user prefs
+ */
+ static void clearSavedIndex() {
+ Duct.PREFS.remove( Duct.SERVED_REPORT_PATHS_PREF );
+ try {
+ Duct.PREFS.flush();
+ }
+ catch( BackingStoreException e ) {
+ throw new IllegalStateException( e );
+ }
+ }
+
+ /**
+ * Smashes /shutdown
until it fails
+ */
+ static void ensureDeath() {
+ long expiry = System.currentTimeMillis() + 5000;
+
+ Response resp;
+ do {
+ if( System.currentTimeMillis() > expiry ) {
+ throw new IllegalStateException( "duct shutdown failure" );
+ }
+
+ resp = shutdown( Duct.PORT );
+ try {
+ Thread.sleep( 100 );
+ }
+ catch( InterruptedException e ) {
+ throw new IllegalStateException( e );
+ }
+ }
+ while( resp.code == 200 );
+ }
+
+ /**
+ * Issues a /heartbeat
request to 127.0.0.1
+ *
+ * @return the response
+ */
+ static Response heartbeat( int port ) {
+ return heartbeat( "127.0.0.1", port );
+ }
+
+ /**
+ * Issues a /heartbeat
request
+ *
+ * @param ip The IP address to request to
+ * @param port The port to address to
+ * @return the response
+ */
+ static Response heartbeat( String ip, int port ) {
+ return HttpClient.request( "http://" + ip + ":" + port + "/heartbeat", "GET", null );
+ }
+
+ /**
+ * Gets the report index
+ *
+ * @return The report index
+ */
+ static Response index( int port ) {
+ return HttpClient.request( "http://localhost:" + port + "/list", "GET", null );
+ }
+
+ /**
+ * Issues a /shutdown
request
+ *
+ * @return the response
+ */
+ static Response shutdown( int port ) {
+ return HttpClient.request( "http://localhost:" + port + "/shutdown", "POST", null );
+ }
+
+ /**
+ * Loads a classpath resource
+ *
+ * @param name The resource name
+ * @return resource content
+ */
+ static String resource( String name ) {
+ try( InputStream resource = Duct.class.getClassLoader()
+ .getResourceAsStream( name ); ) {
+ return read( resource );
+ }
+ catch( IOException ioe ) {
+ throw new UncheckedIOException( ioe );
+ }
+ }
+
+ private static String read( InputStream is ) {
+ try( ByteArrayOutputStream data = new ByteArrayOutputStream() ) {
+ byte[] buff = new byte[1024];
+ int read = 0;
+ while( (read = is.read( buff )) >= 0 ) {
+ data.write( buff, 0, read );
+ }
+ return new String( data.toByteArray(), UTF_8 );
+ }
+ catch( IOException ioe ) {
+ throw new UncheckedIOException( ioe );
+ }
+ }
+
+ /**
+ * @param content Some strings
+ * @return A string that can be trivially copy/pasted into java source
+ */
+ public static String copypasta( String... content ) {
+ return copypasta( Stream.of( content ) );
+ }
+
+ /**
+ * @param content Some strings
+ * @return A string that can be trivially copy/pasted into java source
+ */
+ public static String copypasta( Stream content ) {
+ return content
+ .map( s -> s.replaceAll( "\r", "" ) )
+ .flatMap( s -> Stream.of( s.split( "\n" ) ) )
+ .map( s -> s.replaceAll( "\"", "'" ) )
+ .collect( Collectors.joining( "\",\n\"", "\"", "\"" ) );
+ }
+}
diff --git a/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ReaperTest.java b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ReaperTest.java
new file mode 100644
index 0000000000..bbb6c36970
--- /dev/null
+++ b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ReaperTest.java
@@ -0,0 +1,236 @@
+package com.mastercard.test.flow.report.duct;
+
+import static java.time.temporal.ChronoUnit.MILLIS;
+import static java.time.temporal.ChronoUnit.SECONDS;
+import static java.util.stream.Collectors.joining;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.when;
+
+import java.time.Duration;
+import java.time.Instant;
+import java.util.ArrayDeque;
+import java.util.ArrayList;
+import java.util.Deque;
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+/**
+ * You might be a king or a little street sweeper, but sooner or later you dance
+ * with the {@link Reaper}
+ */
+@SuppressWarnings("static-method")
+class ReaperTest {
+
+ /**
+ * Instant reaping - the expiry has already been exceeded
+ *
+ * @throws InterruptedException unexpected
+ */
+ @Test
+ void pastDue() throws InterruptedException {
+ Duct duct = Mockito.mock( Duct.class );
+ when( duct.expiry() ).thenReturn( Instant.now().minus( 1, SECONDS ) );
+
+ Reaper reaper = new Reaper( duct );
+
+ reaper.start();
+ reaper.join();
+
+ // we accessed the expiry once
+ Mockito.verify( duct ).expiry();
+ // and immediately shut things down
+ Mockito.verify( duct ).stop();
+ // and that's it!
+ Mockito.verifyNoMoreInteractions( duct );
+ }
+
+ /**
+ * Exercises the case where the expiry is in the future but is not extended
+ *
+ * @throws InterruptedException unexpected
+ */
+ @Test
+ void thisTime() throws InterruptedException {
+ new ReaperHarness()
+ .withExpiries( 10, 10 )
+ .withClocks( 0, 11 )
+ .expect( ""
+ + "clock checked, it's 1970-01-01T00:00:00Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:10Z\n"
+ + "Sleeping for PT10S\n"
+ + "clock checked, it's 1970-01-01T00:00:11Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:10Z\n"
+ + "stopped!" );
+ }
+
+ /**
+ * Exercises the case where the expiry is extended once
+ *
+ * @throws InterruptedException unexpected
+ */
+ @Test
+ void nextTime() throws InterruptedException {
+ new ReaperHarness()
+ .withExpiries( 10, 20, 20 )
+ .withClocks( 0, 11, 21 )
+ .expect( ""
+ + "clock checked, it's 1970-01-01T00:00:00Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:10Z\n"
+ + "Sleeping for PT10S\n"
+ + "clock checked, it's 1970-01-01T00:00:11Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:20Z\n"
+ + "Sleeping for PT9S\n"
+ + "clock checked, it's 1970-01-01T00:00:21Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:20Z\n"
+ + "stopped!" );
+ }
+
+ /**
+ * Exercises the case where the expiry is extended twice
+ *
+ * @throws InterruptedException unexpected
+ */
+ @Test
+ void theTimeAfterThat() throws InterruptedException {
+ new ReaperHarness()
+ .withExpiries( 10, 20, 30, 30 )
+ .withClocks( 0, 11, 21, 31 )
+ .expect( ""
+ + "clock checked, it's 1970-01-01T00:00:00Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:10Z\n"
+ + "Sleeping for PT10S\n"
+ + "clock checked, it's 1970-01-01T00:00:11Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:20Z\n"
+ + "Sleeping for PT9S\n"
+ + "clock checked, it's 1970-01-01T00:00:21Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:30Z\n"
+ + "Sleeping for PT9S\n"
+ + "clock checked, it's 1970-01-01T00:00:31Z\n"
+ + "expiry checked, it's 1970-01-01T00:00:30Z\n"
+ + "stopped!" );
+ }
+
+ /**
+ * Checks that our default clock implementations behave themselves
+ *
+ * @throws InterruptedException unexpected
+ */
+ @Test
+ void realSleep() throws InterruptedException {
+
+ Duct duct = Mockito.mock( Duct.class );
+
+ Instant start = Instant.now();
+
+ when( duct.expiry() )
+ .thenReturn( start.plus( 1, SECONDS ) );
+
+ Reaper reaper = new Reaper( duct );
+ reaper.start();
+ reaper.join();
+
+ Instant end = Instant.now();
+
+ Mockito.verify( duct ).stop();
+
+ long actualSleep = Duration.between( start, end ).toMillis();
+
+ assertTrue( 1000 < actualSleep && actualSleep < 2000,
+ "sleep duration should be longer than 1 second and shorter than 2, but it was "
+ + actualSleep + "ms" );
+
+ // check the sleep function directly to confirm it's not sleeping for shorter
+ // than we ask for
+ start = Instant.now();
+ reaper.sleep().accept( Duration.of( 500, MILLIS ) );
+ actualSleep = Duration.between( start, Instant.now() ).toMillis();
+
+ assertTrue( 510 <= actualSleep && actualSleep < 600,
+ "sleep duration should be between 510 and 600, but it was was "
+ + actualSleep + "ms" );
+ }
+
+ /**
+ * Convenient way to exercise the {@link Reaper}
+ */
+ static class ReaperHarness {
+ private static final Instant START = Instant.EPOCH;
+
+ private final List log = new ArrayList<>();
+ private final Deque expiries = new ArrayDeque<>();
+ private final Deque clocks = new ArrayDeque<>();
+
+ /**
+ * Sets the expiry values that will be returned from successive calls to
+ * {@link Duct#expiry()}
+ *
+ * @param delays A sequence of seconds past the epoch
+ * @return this
+ */
+ ReaperHarness withExpiries( int... delays ) {
+ for( int d : delays ) {
+ expiries.add( START.plus( d, SECONDS ) );
+ }
+ return this;
+ }
+
+ /**
+ * Sets the values that will be returned from successive calls to the
+ * {@link Reaper}'s clock
+ *
+ * @param times A sequence of seconds past the epoch
+ * @return this
+ */
+ ReaperHarness withClocks( int... times ) {
+ for( int t : times ) {
+ clocks.add( START.plus( t, SECONDS ) );
+ }
+ return this;
+ }
+
+ /**
+ * Invokes the reaper and then asserts on the activity
+ *
+ * @param events expected event log
+ */
+ void expect( String events ) {
+ int expiryCount = expiries.size();
+
+ Duct duct = Mockito.mock( Duct.class );
+ Mockito.when( duct.expiry() )
+ .thenAnswer( e -> {
+ log.add( "expiry checked, it's " + expiries.getFirst() );
+ return expiries.removeFirst();
+ } );
+ Mockito.doAnswer( e -> log.add( "stopped!" ) ).when( duct ).stop();
+
+ Reaper reaper = new Reaper( duct )
+ .withClock(
+ () -> {
+ log.add( "clock checked, it's " + clocks.getFirst() );
+ return clocks.removeFirst();
+ },
+ d -> log.add( "Sleeping for " + d ) );
+
+ reaper.start();
+ try {
+ reaper.join();
+ }
+ catch( InterruptedException e ) {
+ throw new IllegalStateException( e );
+ }
+
+ assertEquals( "[]", expiries.toString(), "unexpended expiries" );
+ assertEquals( "[]", clocks.toString(), "unexpended clocks" );
+ assertEquals( events, log.stream().collect( joining( "\n" ) ) );
+
+ Mockito.verify( duct, times( expiryCount ) ).expiry();
+ Mockito.verify( duct, times( 1 ) ).stop();
+ Mockito.verifyNoMoreInteractions( duct );
+ }
+ }
+}
diff --git a/report/duct/src/test/java/com/mastercard/test/flow/report/duct/SearchTest.java b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/SearchTest.java
new file mode 100644
index 0000000000..0d9f394041
--- /dev/null
+++ b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/SearchTest.java
@@ -0,0 +1,79 @@
+package com.mastercard.test.flow.report.duct;
+
+import static java.util.stream.Collectors.joining;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Instant;
+import java.util.function.BiConsumer;
+import java.util.stream.Stream;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+
+import com.mastercard.test.flow.report.QuietFiles;
+
+/**
+ * Exercises {@link Search}
+ */
+@SuppressWarnings("static-method")
+class SearchTest {
+ private static final Path ROOT = Paths.get( "target", "SearchTest", "find" );
+
+ /**
+ * Creates reports that exercise search behaviour
+ */
+ @BeforeAll
+ static void createReports() {
+ // create a bunch of reports
+ QuietFiles.recursiveDelete( ROOT );
+ Stream.of(
+ "obvious",
+ "lightly/obscured",
+ "lightly/obscured/with/a/matryoshka/report",
+ "buried/a/few/levels/deep",
+ "src/main/java/no_thanks",
+ "lightly/src/test/java/nor/this",
+ "buried/in/node_modules/absolutely/not" )
+ .forEach( p -> DuctTestUtil.createReport(
+ ROOT.resolve( p ), "model", "title", Instant.now() ) );
+ }
+
+ /**
+ * Exercises {@link Search#find(java.nio.file.Path)}
+ */
+ @Test
+ void find() {
+ // search for reports from various start points, see which we find
+ BiConsumer test = ( in, out ) -> assertEquals(
+ out,
+ Search.find( ROOT.resolve( in ) )
+ .map( p -> ROOT.relativize( p ).toString().replace( '\\', '/' ) )
+ .sorted()
+ .collect( joining( "\n" ) ),
+ "searching from " + in );
+
+ // searching from the root. Nested reports and those in source trees are not
+ // found
+ test.accept( "", ""
+ + "buried/a/few/levels/deep\n"
+ + "lightly/obscured\n"
+ + "obvious" );
+
+ // searching directly in a report
+ test.accept( "obvious", ""
+ + "obvious" );
+
+ // the search stops when it hits a report, but if you start the search deeper it
+ // will continue
+ test.accept( "lightly/obscured", ""
+ + "lightly/obscured" );
+ test.accept( "lightly/obscured/with", ""
+ + "lightly/obscured/with/a/matryoshka/report" );
+
+ // similarly, you can search inside a forbidden dir
+ test.accept( "buried/in/node_modules/absolutely", ""
+ + "buried/in/node_modules/absolutely/not" );
+ }
+}
diff --git a/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServeTest.java b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServeTest.java
new file mode 100644
index 0000000000..772fc5eafa
--- /dev/null
+++ b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServeTest.java
@@ -0,0 +1,91 @@
+package com.mastercard.test.flow.report.duct;
+
+import static com.mastercard.test.flow.report.duct.DuctTestUtil.copypasta;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Instant;
+
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.slf4j.LoggerFactory;
+
+import com.mastercard.test.flow.report.QuietFiles;
+
+/**
+ * Exercises the {@link Duct#serve(Path)} entrypoint
+ */
+@SuppressWarnings("static-method")
+class ServeTest {
+
+ private static final Path REPORT_ROOT = Paths.get( "target", "ServeTest" );
+ private static final Path VALID_REPORT = REPORT_ROOT.resolve( "valid" );
+ private static final Path NOT_A_REPORT = REPORT_ROOT.resolve( "not_a_report" );
+
+ /**
+ * Builds some reports
+ */
+ @BeforeAll
+ static void createReports() {
+ Duct.debuggingTo( LoggerFactory.getLogger( "ServeTest_Debug" )::error );
+
+ // clear out our local report dir
+ QuietFiles.recursiveDelete( REPORT_ROOT );
+
+ DuctTestUtil.createReport( VALID_REPORT,
+ "valid", "report", Instant.ofEpochSecond( 10 ),
+ "abc,def,PASS", "ghi,FAIL,jkl", "SKIP,mno", "pqr,ERROR" );
+
+ QuietFiles.createDirectories( NOT_A_REPORT );
+ }
+
+ /**
+ * Makes sure there are no instances, then clears the saved index
+ */
+ @BeforeEach
+ void clearState() {
+ DuctTestUtil.ensureDeath();
+ DuctTestUtil.clearSavedIndex();
+ }
+
+ /**
+ * Exercises the process-launching behaviour of {@link Duct#serve(Path)}
+ */
+ @Test
+ void serve() {
+ Duct.serve( NOT_A_REPORT );
+ DuctTestUtil.waitForLife( Duct.PORT );
+
+ assertEquals(
+ "[ ]",
+ DuctTestUtil.index( Duct.PORT ).body,
+ "duct is up, but the index is empty" );
+
+ Duct.serve( VALID_REPORT );
+
+ assertEquals( copypasta(
+ "[ {",
+ " 'meta' : {",
+ " 'modelTitle' : 'valid',",
+ " 'testTitle' : 'report',",
+ " 'timestamp' : 10000",
+ " },",
+ " 'counts' : {",
+ " 'pass' : 1,",
+ " 'fail' : 1,",
+ " 'skip' : 1,",
+ " 'error' : 1",
+ " },",
+ " 'path' : '%maskedroot%_flow_report_duct_target_ServeTest_valid/'",
+ "} ]" ),
+ copypasta( DuctTestUtil.index( Duct.PORT ).body
+ // the path is absolute, and we obviously can't know where this project is
+ // checked out
+ .replaceFirst(
+ "(\"path\" : \").*(_flow_report_duct_target_ServeTest_valid/\")",
+ "$1%maskedroot%$2" ) ),
+ "the same call added the report to the existing instance" );
+ }
+}
diff --git a/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServerTest.java b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServerTest.java
new file mode 100644
index 0000000000..db2b43ab12
--- /dev/null
+++ b/report/duct/src/test/java/com/mastercard/test/flow/report/duct/ServerTest.java
@@ -0,0 +1,337 @@
+package com.mastercard.test.flow.report.duct;
+
+import static java.nio.charset.StandardCharsets.UTF_8;
+import static java.util.stream.Collectors.toList;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.verifyNoMoreInteractions;
+import static org.mockito.Mockito.when;
+
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Instant;
+import java.util.Collections;
+import java.util.List;
+import java.util.function.BiConsumer;
+import java.util.stream.Stream;
+
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
+
+import com.mastercard.test.flow.report.QuietFiles;
+
+/**
+ * Exercises {@link Server}
+ */
+@SuppressWarnings("static-method")
+class ServerTest {
+
+ /**
+ * Demonstrates startup and shutdown
+ */
+ @Test
+ void life() {
+
+ Server server = new Server( Mockito.mock( Duct.class ), 0 );
+ String url = "";
+ try {
+ server.start();
+ url = "http://localhost:" + server.port() + "/list";
+
+ assertEquals( "rc: 200\n"
+ + "[ ]",
+ HttpClient.request( url, "GET", null ).toString(),
+ "Server is alive!" );
+ }
+ finally {
+ server.awaitStop();
+ }
+
+ assertEquals( -1,
+ HttpClient.request( url, "GET", null ).code,
+ "server is dead!" );
+ }
+
+ /**
+ * Exercises the static endpoints
+ */
+ @Test
+ void endpoints() throws Exception {
+ Duct duct = Mockito.mock( Duct.class );
+ when( duct.heartbeat() )
+ .thenReturn( Instant.EPOCH );
+ when( duct.add( any( Path.class ) ) )
+ .thenAnswer( inv -> "added " + inv.getArgument( 0 ) );
+ when( duct.index() )
+ .thenReturn( Collections.emptyList() );
+
+ Server server = new Server( duct, 0 );
+ String url = "";
+ try {
+ server.start();
+
+ url = "http://localhost:" + server.port();
+
+ assertEquals( "rc: 200\n"
+ + "Expiry at 1970-01-01T00:00:00Z",
+ HttpClient.request( url + "/heartbeat", "GET", null ).toString(),
+ url + "/heartbeat" );
+ verify( duct ).heartbeat();
+
+ assertEquals( "rc: 200\n"
+ + "Shutting down",
+ HttpClient.request( url + "/shutdown", "POST", null ).toString(),
+ url + "/shutdown" );
+ verify( duct ).stop();
+
+ assertEquals( "rc: 200\n"
+ + "added path_to_report",
+ HttpClient.request( url + "/add", "POST", "path_to_report" ).toString(),
+ url + "/add" );
+ verify( duct ).add( any( Path.class ) );
+
+ assertEquals( "rc: 200\n"
+ + "[ ]",
+ HttpClient.request( url + "/list", "GET", null ).toString(),
+ url + "/list" );
+ verify( duct ).index();
+
+ verifyNoMoreInteractions( duct );
+ }
+ finally {
+ server.awaitStop();
+ }
+
+ assertEquals( -1,
+ HttpClient.request( url + "/heartbeat", "GET", null ).code,
+ url + "/heartbeat" );
+ }
+
+ /**
+ * Shows that the routing will serve flow details pages that didn't exist at the
+ * time the report was indexed. This is important as the report will be added to
+ * duct before all flows have been processed.
+ */
+ @Test
+ void dynamicDetailMap() {
+ Server server = new Server( null, 0 );
+ try {
+ Path root = Paths.get( "target/ServerTest/dynamicDetailMap" );
+ Path detail = root.resolve( "detail" );
+ QuietFiles.recursiveDelete( root );
+ QuietFiles.createDirectories( detail );
+
+ // create a sketch of a report structure
+ QuietFiles.write( root.resolve( "index.html" ), "index".getBytes( UTF_8 ) );
+ QuietFiles.write( detail.resolve( "00000000000000000000000000000001.html" ),
+ "before".getBytes( UTF_8 ) );
+
+ server.start();
+
+ server.map( "/dynamicDetailMap/", root );
+
+ BiConsumer test = ( path, response ) -> {
+ String url = "http://localhost:" + server.port() + path;
+ assertEquals( response, HttpClient.request( url, "GET", null ).toString(), "for " + url );
+ };
+
+ // the files that exist at the time of mapping are returned as expected
+ test.accept( "/dynamicDetailMap/index.html", ""
+ + "rc: 200\n"
+ + "index" );
+ test.accept( "/dynamicDetailMap/detail/00000000000000000000000000000001.html", ""
+ + "rc: 200\n"
+ + "before" );
+ // and we even mapped the index file to the directory path
+ test.accept( "/dynamicDetailMap/", ""
+ + "rc: 200\n"
+ + "index" );
+
+ // add another detail file
+
+ QuietFiles.write( detail.resolve( "00000000000000000000000000000002.html" ),
+ "after".getBytes( UTF_8 ) );
+
+ // it gets mapped without us having to tell the server about it
+ test.accept( "/dynamicDetailMap/detail/00000000000000000000000000000002.html", ""
+ + "rc: 200\n"
+ + "after" );
+
+ // only files that are named like flow detail pages are served
+ QuietFiles.write( detail.resolve( "badname.html" ),
+ "should not be served".getBytes( UTF_8 ) );
+ test.accept( "/dynamicDetailMap/detail/badname.html", ""
+ + "rc: 404\n" );
+ }
+ finally {
+ server.awaitStop();
+ }
+ }
+
+ /**
+ * Shows that requests to non-loopback addresses are 403-rejected
+ *
+ * @throws UnknownHostException if we fail to find our own address
+ */
+ @Test
+ void loopback() throws UnknownHostException {
+ InetAddress localhost = InetAddress.getLocalHost();
+ List nonLoop = Stream.of( InetAddress
+ .getAllByName( localhost.getCanonicalHostName() ) )
+ .filter( a -> !a.isLoopbackAddress() )
+ .map( addr -> {
+ if( addr instanceof Inet6Address ) {
+ // in URLs, ipv6 addresses need to be in brackets
+ return "[" + addr.getHostAddress() + "]";
+ }
+ return addr.getHostAddress();
+ } )
+ .collect( toList() );
+
+ assertTrue( nonLoop.size() > 0, "Expected at least 1 non-loopback address" );
+
+ Path root = Paths.get( "target/ServerTest/loopback" );
+ QuietFiles.recursiveDelete( root );
+ QuietFiles.createDirectories( root );
+ QuietFiles.write( root.resolve( "index.html" ), "index".getBytes( UTF_8 ) );
+
+ Server server = new Server( null, 0 );
+ try {
+ server.start();
+
+ server.map( "loopback/", root );
+
+ BiConsumer test = ( addr, response ) -> {
+ String url = "http://" + addr + ":" + server.port() + "/loopback/";
+ assertEquals(
+ response,
+ HttpClient.request( url, "GET", null ).toString(),
+ "for " + url );
+ };
+
+ // requests on the loopback address are served normally
+ Stream.of( "127.0.0.1", "localhost", "[::1]" )
+ .forEach( addr -> test.accept(
+ addr, "rc: 200\nindex" ) );
+
+ // non-loopback address are rejected
+ nonLoop.stream()
+ .forEach( addr -> test.accept(
+ addr, "rc: 403\n" ) );
+ }
+ finally {
+ server.awaitStop();
+ }
+ }
+
+ /**
+ * Shows that mapped reports can be remapped and unmapped
+ */
+ @Test
+ void reunmap() {
+
+ Path reportDir = Paths.get( "target/ServerTest/reunmap" );
+ QuietFiles.recursiveDelete( reportDir );
+ DuctTestUtil.createReport( reportDir, "model", "test", Instant.now() );
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "script.js" ),
+ "script".getBytes( UTF_8 ) );
+
+ Server server = new Server( null, 0 );
+ try {
+ server.start();
+ server.map( "initial/", reportDir );
+ String url = "http://localhost:" + server.port() + "/";
+
+ BiConsumer test = ( path, rc ) -> assertEquals(
+ rc,
+ HttpClient.request( url + path, "GET", null ).code,
+ "for " + path );
+
+ // file is served as expected
+ test.accept( "initial/res/script.js", 200 );
+
+ // add a new js file
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "added.js" ),
+ "added".getBytes( UTF_8 ) );
+
+ // new file is not served
+ test.accept( "initial/res/added.js", 404 );
+
+ // map the dir again
+ server.map( "remap/", reportDir );
+
+ // the old mapping has gone!
+ test.accept( "initial/res/script.js", 404 );
+
+ // but both now exist under the new path
+ test.accept( "remap/res/script.js", 200 );
+ test.accept( "remap/res/added.js", 200 );
+
+ server.unmap( reportDir );
+
+ // mappings removed
+ test.accept( "remap/res/script.js", 404 );
+ test.accept( "remap/res/added.js", 404 );
+ }
+ finally {
+ server.awaitStop();
+ }
+ }
+
+ /**
+ * Demonstrates that only .ico, .js and .css files are served from the
+ * res
directory
+ */
+ @Test
+ void resourceTypes() {
+ Path reportDir = Paths.get( "target/ServerTest/resourceTypes" );
+ QuietFiles.recursiveDelete( reportDir );
+ DuctTestUtil.createReport( reportDir, "model", "test", Instant.now() );
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "favicon.ico" ),
+ "icon".getBytes( UTF_8 ) );
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "style.css" ),
+ "style".getBytes( UTF_8 ) );
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "script.js" ),
+ "script".getBytes( UTF_8 ) );
+ QuietFiles.write( reportDir.resolve( "res" ).resolve( "text.txt" ),
+ "text".getBytes( UTF_8 ) );
+ QuietFiles.createDirectories( reportDir.resolve( "res" ).resolve( "dir.css" ) );
+
+ Server server = new Server( null, 0 );
+ try {
+ server.start();
+ server.map( "resourceTypes/", reportDir );
+ String url = "http://localhost:" + server.port() + "/resourceTypes/";
+
+ assertEquals( "rc: 200\n"
+ + "icon",
+ HttpClient.request( url + "/res/favicon.ico", "GET", null ).toString() );
+
+ assertEquals( "rc: 200\n"
+ + "style",
+ HttpClient.request( url + "/res/style.css", "GET", null ).toString() );
+
+ assertEquals( "rc: 200\n"
+ + "script",
+ HttpClient.request( url + "/res/script.js", "GET", null ).toString() );
+
+ // text files are not mapped
+ assertEquals( "rc: 404\n"
+ + "404 Not found
",
+ HttpClient.request( url + "/res/text.txt", "GET", null ).toString() );
+
+ // directories are not mapped
+ assertEquals( "rc: 404\n"
+ + "404 Not found
",
+ HttpClient.request( url + "/res/dir.css", "GET", null ).toString() );
+ }
+ finally {
+ server.awaitStop();
+ }
+ }
+}
diff --git a/report/duct/src/test/resources/simplelogger.properties b/report/duct/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000000..817d19b6a5
--- /dev/null
+++ b/report/duct/src/test/resources/simplelogger.properties
@@ -0,0 +1,5 @@
+# http://www.slf4j.org/api/org/slf4j/impl/SimpleLogger.html
+org.slf4j.simpleLogger.logFile=target/log.txt
+org.slf4j.simpleLogger.showDateTime=true
+org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd'T'HH:mm:ss.SSSZ
+org.slf4j.simpleLogger.defaultLogLevel=info
\ No newline at end of file
diff --git a/report/pom.xml b/report/pom.xml
index b61b4c8047..7dc8541274 100644
--- a/report/pom.xml
+++ b/report/pom.xml
@@ -4,12 +4,13 @@
com.mastercard.test.flow
parent
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
report
pom
Visualising assertion results
+ duct
report-core
report-ng
diff --git a/report/report-core/pom.xml b/report/report-core/pom.xml
index 838eadd530..acab9cea00 100644
--- a/report/report-core/pom.xml
+++ b/report/report-core/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
report-core
jar
@@ -137,4 +137,4 @@
-
+
\ No newline at end of file
diff --git a/report/report-core/src/main/java/com/mastercard/test/flow/report/FailureSink.java b/report/report-core/src/main/java/com/mastercard/test/flow/report/FailureSink.java
new file mode 100644
index 0000000000..f0a56e84a1
--- /dev/null
+++ b/report/report-core/src/main/java/com/mastercard/test/flow/report/FailureSink.java
@@ -0,0 +1,23 @@
+package com.mastercard.test.flow.report;
+
+/**
+ * Functional interface to a logging framework
+ */
+@FunctionalInterface
+public interface FailureSink {
+
+ /**
+ * Consumes a logging event
+ *
+ * @param msg The log message
+ * @param params Log message parameters
+ */
+ void log( String msg, Object... params );
+
+ /**
+ * A sink that does nothing
+ */
+ FailureSink SILENT = ( msg, params ) -> {
+ // hush!
+ };
+}
diff --git a/report/report-core/src/main/java/com/mastercard/test/flow/report/JsApp.java b/report/report-core/src/main/java/com/mastercard/test/flow/report/JsApp.java
index 7972b02ddb..78cc69d46b 100644
--- a/report/report-core/src/main/java/com/mastercard/test/flow/report/JsApp.java
+++ b/report/report-core/src/main/java/com/mastercard/test/flow/report/JsApp.java
@@ -123,7 +123,7 @@ private static void fixLazyChunkLoadingPath( Path resDir ) {
.orElse( null );
if( runtime != null ) {
String content = new String( Files.readAllBytes( runtime ), UTF_8 );
- String fixed = content.replaceAll( "(\\(\\d+===e\\?\"common\":e\\))", "\"res/\" + $1" );
+ String fixed = content.replaceAll( "(\\(\\d+===e\\?\"common\":e\\))", "\"res/\"+$1" );
if( fixed.equals( content ) ) {
throw new IllegalStateException( "Failed to fix chunk load path" );
}
diff --git a/report/report-core/src/main/java/com/mastercard/test/flow/report/LocalBrowse.java b/report/report-core/src/main/java/com/mastercard/test/flow/report/LocalBrowse.java
new file mode 100644
index 0000000000..00122da21a
--- /dev/null
+++ b/report/report-core/src/main/java/com/mastercard/test/flow/report/LocalBrowse.java
@@ -0,0 +1,196 @@
+package com.mastercard.test.flow.report;
+
+import java.awt.Desktop;
+import java.awt.Desktop.Action;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+
+import com.mastercard.test.flow.util.Option;
+
+/**
+ * Utility for opening a browser on some local target, either a
+ * file://
or a http://localhost
url
+ */
+public class LocalBrowse {
+
+ /**
+ * Allows control over browser-opening behaviour
+ */
+ public static final Option SUPPRESS = new Option.Builder()
+ .property( "mctf.suppress.browse" )
+ .description( "Supply 'true' to suppress attempts to open browsers" );
+
+ /**
+ * Allows the option of a fallback browser-opening behaviour
+ */
+ public static final Option XDG_OPEN_FALLBACK = new Option.Builder()
+ .property( "mctf.browse.xdg_open" )
+ .description( "Supply true to try and fall back to `xdg-open` when "
+ + "java's desktop integration fails" );
+
+ /**
+ * A {@link LocalBrowse} implementation that uses AWT's desktop integration in
+ * the first instance, but falls back to xdg-open
when AWT's browse
+ * action is not supported
+ */
+ public static final LocalBrowse WITH_AWT = new LocalBrowse(
+ // This works on windows, and I'd hope that it's OK on mac too
+ () -> Desktop.isDesktopSupported()
+ && Desktop.getDesktop().isSupported( Action.BROWSE ),
+ uri -> Desktop.getDesktop().browse( uri ),
+ // the browse action seems to be poorly supported linux, but
+ // xdg-open will probably work
+ uri -> new ProcessBuilder( "xdg-open",
+ // we're issuing commandlines, so belt-and-braces
+ localCommandlineURI( uri ) ).start() );
+
+ /**
+ * Mitigates command injection risk by stripping anything we don't use out of a
+ * URI. We only retain the scheme, which must be file
or
+ * http
, and the path, which cannot contain anything other that
+ * [0-9a-zA-Z_/]
.
+ *
+ * @param uri A URI
+ * @return a file or localhost uri with the same path, but with anything outside
+ * of [0-9a-zA-Z_/]
stripped out
+ * @throws IllegalArgumentException if the scheme is not file
or
+ * http
+ */
+ static String localCommandlineURI( URI uri ) {
+ if( "file".equals( uri.getScheme() ) ) {
+ return uri.getScheme() + ":" + uri.getPath()
+ .replaceAll( "[^0-9a-zA-Z_/]", "" );
+ }
+ if( "http".equals( uri.getScheme() ) ) {
+ return uri.getScheme() + "://localhost" + uri.getPath()
+ .replaceAll( "[^0-9a-zA-Z_/]", "" );
+ }
+ throw new IllegalArgumentException( "Unsupported scheme on " + uri );
+ }
+
+ private final Support support;
+ private final Trigger primary;
+ private final Trigger fallback;
+
+ /**
+ * @param support is browsing supported
+ * @param primary launch a browser via the supported means
+ * @param fallback launch a browser via some other means
+ */
+ public LocalBrowse( Support support, Trigger primary, Trigger fallback ) {
+ this.support = support;
+ this.primary = primary;
+ this.fallback = fallback;
+ }
+
+ /**
+ * Attempts to open a browser to view the supplied target
+ *
+ * @param uri The target
+ * @param sinks What to do with failures
+ */
+ @SafeVarargs
+ public final void to( String uri, FailureSink... sinks ) {
+ try {
+ to( new URI( uri ), sinks );
+ }
+ catch( URISyntaxException e ) {
+ for( FailureSink sink : sinks ) {
+ sink.log( "Failed to parse uri from '{}'", uri, e );
+ }
+ }
+ }
+
+ /**
+ * Attempts to open a browser to view the supplied target
+ *
+ * @param url The target
+ * @param sinks What to do with failures
+ */
+ @SafeVarargs
+ public final void to( URL url, FailureSink... sinks ) {
+ try {
+ to( url.toURI(), sinks );
+ }
+ catch( URISyntaxException e ) {
+ for( FailureSink sink : sinks ) {
+ sink.log( "Failed to extract uri from '{}'", url, e );
+ }
+ }
+ }
+
+ /**
+ * Attempts to open a browser to view the supplied target
+ *
+ * @param uri The target
+ * @param sinks What to do with failures
+ */
+ @SafeVarargs
+ public final void to( URI uri, FailureSink... sinks ) {
+ if( SUPPRESS.isTrue() ) {
+ logTo( sinks, "Browser launch suppressed by system property {}={}",
+ SUPPRESS.property(), SUPPRESS.value() );
+ return;
+ }
+
+ if( !supported( uri ) ) {
+ logTo( sinks, "Declining nonlocal uri `{}`", uri );
+ return;
+ }
+
+ if( support.supported() ) {
+ try {
+ primary.browse( uri );
+ }
+ catch( Exception e ) {
+ logTo( sinks, "Failed to browse `{}`", uri, e );
+ }
+ }
+ else {
+ try {
+ fallback.browse( uri );
+ }
+ catch( Exception e ) {
+ logTo( sinks, "Failed to {} via fallback route", uri, e );
+ }
+ }
+ }
+
+ private static void logTo( FailureSink[] sinks, String msg, Object... params ) {
+ for( FailureSink sink : sinks ) {
+ sink.log( msg, params );
+ }
+ }
+
+ private static boolean supported( URI uri ) {
+ return "file".equals( uri.getScheme() )
+ || "http".equals( uri.getScheme() ) && "localhost".equals( uri.getHost() );
+ }
+
+ /**
+ * Interface for checking if launching a browser is supported
+ */
+ public interface Support {
+ /**
+ * Checks browsing support
+ *
+ * @return true
if we can expect to launch a browser
+ */
+ boolean supported();
+ }
+
+ /**
+ * Interface for provoking a browser
+ */
+ public interface Trigger {
+ /**
+ * Launches a browser to view the supplied URI
+ *
+ * @param uri The browse target
+ * @throws IOException on failure
+ */
+ void browse( URI uri ) throws IOException;
+ }
+}
diff --git a/report/report-core/src/main/java/com/mastercard/test/flow/report/Reader.java b/report/report-core/src/main/java/com/mastercard/test/flow/report/Reader.java
index 9bf16890b7..ad26d20df4 100644
--- a/report/report-core/src/main/java/com/mastercard/test/flow/report/Reader.java
+++ b/report/report-core/src/main/java/com/mastercard/test/flow/report/Reader.java
@@ -149,14 +149,12 @@ public static final boolean isReportDir( Path p ) {
if( Files.isDirectory( p ) ) {
try( Stream s = Files.list( p ) ) {
Set contents = s.collect( toSet() );
- boolean hasIndex = contents.stream()
+ return contents.stream()
.anyMatch( f -> Files.isRegularFile( f )
- && Writer.INDEX_FILE_NAME.equals( f.getFileName().toString() ) );
- boolean hasDetailDir = contents.stream()
- .anyMatch( f -> Files.isDirectory( p )
- && Writer.DETAIL_DIR_NAME.equals( f.getFileName().toString() ) );
-
- return hasIndex && hasDetailDir;
+ && Writer.INDEX_FILE_NAME.equals( f.getFileName().toString() ) )
+ && contents.stream()
+ .anyMatch( f -> Files.isDirectory( p )
+ && Writer.DETAIL_DIR_NAME.equals( f.getFileName().toString() ) );
}
}
}
diff --git a/report/report-core/src/main/java/com/mastercard/test/flow/report/Writer.java b/report/report-core/src/main/java/com/mastercard/test/flow/report/Writer.java
index 33c5bcf67c..ed1ec365eb 100644
--- a/report/report-core/src/main/java/com/mastercard/test/flow/report/Writer.java
+++ b/report/report-core/src/main/java/com/mastercard/test/flow/report/Writer.java
@@ -5,9 +5,6 @@
import static java.util.stream.Collectors.toMap;
import static java.util.stream.Collectors.toSet;
-import java.awt.Desktop;
-import java.awt.Desktop.Action;
-import java.io.IOException;
import java.nio.file.Path;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
@@ -101,6 +98,18 @@ public Writer( String modelTitle, String testTitle, Path root ) {
app = new JsApp( "/com/mastercard/test/flow/report", root.resolve( "res" ) );
}
+ /**
+ * Writes the duct index file
+ *
+ * @param dir The directory to write to
+ */
+ public static void writeDuctIndex( Path dir ) {
+ new JsApp( "/com/mastercard/test/flow/report", dir.resolve( "res" ) )
+ .write(
+ Collections.singletonMap( "type", "duct" ),
+ dir.resolve( INDEX_FILE_NAME ) );
+ }
+
/**
* Adds or updates a {@link Flow} in the report
*
@@ -173,15 +182,7 @@ public Path path() {
* Attempts to open a browser to view the report. Failure is silent.
*/
public void browse() {
- if( Desktop.isDesktopSupported()
- && Desktop.getDesktop().isSupported( Action.BROWSE ) ) {
- try {
- Desktop.getDesktop().browse( root.resolve( INDEX_FILE_NAME ).toUri() );
- }
- catch( @SuppressWarnings("unused") IOException e ) {
- // oh well
- }
- }
+ LocalBrowse.WITH_AWT.to( root.resolve( INDEX_FILE_NAME ).toUri() );
}
/**
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/Copy.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/Copy.java
new file mode 100644
index 0000000000..a4ea38c0f4
--- /dev/null
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/Copy.java
@@ -0,0 +1,39 @@
+package com.mastercard.test.flow.report;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+/**
+ * Expectation formatting utility
+ */
+public class Copy {
+
+ /**
+ * @param content Some strings
+ * @return A string that can be trivially copy/pasted into java source
+ */
+ public static String pasta( String... content ) {
+ return pasta( Stream.of( content ) );
+ }
+
+ /**
+ * @param content Some strings
+ * @return A string that can be trivially copy/pasted into java source
+ */
+ public static String pasta( Collection content ) {
+ return pasta( content.stream() );
+ }
+
+ /**
+ * @param content Some strings
+ * @return A string that can be trivially copy/pasted into java source
+ */
+ public static String pasta( Stream content ) {
+ return content
+ .map( s -> s.replaceAll( "\r", "" ) )
+ .flatMap( s -> Stream.of( s.split( "\n" ) ) )
+ .map( s -> s.replaceAll( "\"", "'" ) )
+ .collect( Collectors.joining( "\",\n\"", "\"", "\"" ) );
+ }
+}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/JsAppTest.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/JsAppTest.java
index ad45ae4d15..ce7ea40d1c 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/JsAppTest.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/JsAppTest.java
@@ -7,6 +7,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
/**
@@ -15,12 +16,23 @@
@SuppressWarnings("static-method")
class JsAppTest {
+ private static final Path dir = Paths.get( "target" )
+ .resolve( JsAppTest.class.getSimpleName() );
+
+ /**
+ * Deletes the test's working directory
+ */
+ @BeforeAll
+ static void clean() {
+ QuietFiles.recursiveDelete( dir );
+ }
+
/**
* What happens when the manifest file is not found
*/
@Test
void noManifest() {
- Path p = Paths.get( "target/noManifest/res" );
+ Path p = dir.resolve( "noManifest/res" );
IllegalStateException ise = assertThrows( IllegalStateException.class,
() -> new JsApp( "/does/not/exist", p ) );
assertEquals( "Failed to extract /does/not/exist/manifest.txt",
@@ -32,7 +44,7 @@ void noManifest() {
*/
@Test
void emptyManifest() {
- Path p = Paths.get( "target/emptyManifest/res" );
+ Path p = dir.resolve( "emptyManifest/res" );
UncheckedIOException uioe = assertThrows( UncheckedIOException.class,
() -> new JsApp( "/JsAppTest/emptyManifest", p ) );
assertEquals( "Failed to extract index.html", uioe.getMessage() );
@@ -43,7 +55,7 @@ void emptyManifest() {
*/
@Test
void missingManifestEntry() {
- Path p = Paths.get( "target/missingManifestEntry/res" );
+ Path p = dir.resolve( "missingManifestEntry/res" );
IllegalStateException ise = assertThrows( IllegalStateException.class,
() -> new JsApp( "/JsAppTest/missingManifestEntry", p ) );
assertEquals( "Failed to copy resource /JsAppTest/missingManifestEntry/nosuchfile.txt",
@@ -55,10 +67,10 @@ void missingManifestEntry() {
*/
@Test
void missingIndex() {
- Path p = Paths.get( "target/missingIndex/res" );
+ Path p = dir.resolve( "missingIndex/res" );
IllegalStateException ise = assertThrows( IllegalStateException.class,
() -> new JsApp( "/JsAppTest/missingIndex", p ) );
- assertEquals( "Failed to find index.html in target/missingIndex/res",
+ assertEquals( "Failed to find index.html in target/JsAppTest/missingIndex/res",
ise.getMessage().replace( '\\', '/' ) );
}
@@ -67,11 +79,11 @@ void missingIndex() {
*/
@Test
void malformedIndex() {
- Path p = Paths.get( "target/malformedIndex/res" );
+ Path p = dir.resolve( "malformedIndex/res" );
IllegalArgumentException iae = assertThrows( IllegalArgumentException.class,
() -> new JsApp( "/JsAppTest/malformedIndex", p ) );
assertEquals( ""
- + "Start or end line not found in target/malformedIndex/res/index.html\n"
+ + "Start or end line not found in target/JsAppTest/malformedIndex/res/index.html\n"
+ "This is not a valid index file",
iae.getMessage().replace( '\\', '/' ) );
}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/LocalBrowseTest.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/LocalBrowseTest.java
new file mode 100644
index 0000000000..ebd58aa9fb
--- /dev/null
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/LocalBrowseTest.java
@@ -0,0 +1,222 @@
+package com.mastercard.test.flow.report;
+
+import static java.util.stream.Collectors.joining;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.function.BiConsumer;
+import java.util.function.Consumer;
+import java.util.stream.Stream;
+
+import org.junit.jupiter.api.Test;
+
+import com.mastercard.test.flow.util.Option.Temporary;
+
+/**
+ * Exercises {@link LocalBrowse}
+ */
+@SuppressWarnings("static-method")
+class LocalBrowseTest {
+
+ private static final String FILE_STRING = "file://path/to/file";
+ private static final String VALID_STRING = "http://localhost/string";
+ private static final String NON_LOCAL_STRING = "http://string.com";
+ private static final String BAD_STRING = "_ ";
+ private static final URI VALID_URI;
+ private static final URL VALID_URL;
+ private static final URL BAD_URL;
+ static {
+ try {
+ // with thanks to https://stackoverflow.com/a/62660558
+ VALID_URI = new URI( "http://localhost/uri" );
+ VALID_URL = new URL( "http://localhost/url" );
+ BAD_URL = new URL( "http:// _" ); // it's a valid URL, but it's not a URI
+ }
+ catch( Exception e ) {
+ throw new IllegalStateException( e );
+ }
+ }
+
+ /**
+ * Browsing is supported and error-free
+ */
+ @Test
+ void supportedNoErrors() {
+ BrowseHarness bh = new BrowseHarness();
+ bh.expect( b -> b.to( FILE_STRING, bh.sink ),
+ "Browsing to file://path/to/file" );
+ bh.expect( b -> b.to( VALID_STRING, bh.sink ),
+ "Browsing to http://localhost/string" );
+ bh.expect( b -> b.to( VALID_URI, bh.sink ),
+ "Browsing to http://localhost/uri" );
+ bh.expect( b -> b.to( VALID_URL, bh.sink ),
+ "Browsing to http://localhost/url" );
+
+ bh.expect( b -> b.to( BAD_STRING, bh.sink ),
+ "Failure! Failed to parse uri from '{}'",
+ " _ ",
+ " java.net.URISyntaxException: Illegal character in path at index 1: _ " );
+ bh.expect( b -> b.to( BAD_URL, bh.sink ),
+ "Failure! Failed to extract uri from '{}'",
+ " http:// _",
+ " java.net.URISyntaxException: Illegal character in authority at index 7: http:// _" );
+ bh.expect( b -> b.to( NON_LOCAL_STRING, bh.sink ),
+ "Failure! Declining nonlocal uri `{}`",
+ " http://string.com" );
+
+ try( Temporary t = LocalBrowse.SUPPRESS.temporarily( "true" ) ) {
+ bh.expect( b -> b.to( VALID_STRING, bh.sink ),
+ "Failure! Browser launch suppressed by system property {}={}",
+ " mctf.suppress.browse",
+ " true" );
+ }
+ }
+
+ /**
+ * Browsing is supported, but it doesn't work very well
+ */
+ @Test
+ void supportedError() {
+ BrowseHarness bh = new BrowseHarness()
+ .browseFailing( true );
+
+ bh.expect( b -> b.to( VALID_URI, bh.sink ),
+ "Failure! Failed to browse `{}`",
+ " http://localhost/uri",
+ " java.io.IOException: browse fail!" );
+ }
+
+ /**
+ * Browsing is not supported, and our fallback works ok
+ */
+ @Test
+ void unSupportedNoErrors() {
+ BrowseHarness bh = new BrowseHarness()
+ .supported( false );
+
+ // The xdg-open fallback must be explicitly enabled
+ try( Temporary t = LocalBrowse.XDG_OPEN_FALLBACK.temporarily( "true" ) ) {
+ bh.expect( b -> b.to( VALID_URI, bh.sink ),
+ "Fallback browsing to http://localhost/uri" );
+ }
+ }
+
+ /**
+ * Browsing is not supported, and our fallback fails!
+ */
+ @Test
+ void unSupportedErrors() {
+
+ BrowseHarness bh = new BrowseHarness()
+ .supported( false )
+ .launchFailing( true );
+
+ try( Temporary t = LocalBrowse.XDG_OPEN_FALLBACK.temporarily( "true" ) ) {
+ bh.expect( b -> b.to( VALID_URI, bh.sink ),
+ "Failure! Failed to {} via fallback route",
+ " http://localhost/uri",
+ " java.io.IOException: fallback browse fail" );
+ }
+ }
+
+ /**
+ * Exercises {@link LocalBrowse#localCommandlineURI(URI)}
+ */
+ @Test
+ void localCommandlineURI() {
+ BiConsumer test = ( in, out ) -> {
+ try {
+ assertEquals( out,
+ LocalBrowse.localCommandlineURI( new URI( in ) ),
+ "for " + in );
+ }
+ catch( URISyntaxException e ) {
+ throw new IllegalArgumentException( "bad uri " + in, e );
+ }
+ catch( Exception e ) {
+ e.printStackTrace();
+ assertEquals( out, e.getMessage(), "for bad input " + in );
+ }
+ };
+
+ test.accept( "file:/path/to/file", "file:/path/to/file" );
+ test.accept( "file:/path/to/file;rm%20-rf%20*", "file:/path/to/filermrf" );
+ test.accept( "file:/ᓄᓇᕗᒻᒥᐅᑦ/বাংলা/ኤርትራ", "file:///" );
+
+ test.accept( "http://localhost/path/to/file", "http://localhost/path/to/file" );
+ test.accept( "http://localhost/path/to/file?query=foo", "http://localhost/path/to/file" );
+ test.accept( "http://localhost/path/to/file#fragment", "http://localhost/path/to/file" );
+
+ test.accept( "http://remote.com/path/to/file", "http://localhost/path/to/file" );
+
+ test.accept( "http://remote.com/path/to/file;rm%20-rf%20*",
+ "http://localhost/path/to/filermrf" );
+
+ test.accept( "https://localhost/path/to/file",
+ "Unsupported scheme on https://localhost/path/to/file" );
+ }
+
+ private static class BrowseHarness {
+ private final List log = new ArrayList<>();
+
+ private boolean supported = true;
+ private boolean browseFail = false;
+ private boolean launchFail = false;
+
+ public final FailureSink sink = ( msg, params ) -> log
+ .add( String.format( "Failure! %s\n %s",
+ msg, Stream.of( params ).map( String::valueOf ).collect( joining( "\n " ) ) ) );
+
+ private final LocalBrowse browse = new LocalBrowse(
+ () -> supported,
+ uri -> {
+ if( browseFail ) {
+ throw new IOException( "browse fail!" );
+ }
+ log.add( "Browsing to " + uri );
+ },
+ uri -> {
+ if( launchFail ) {
+ throw new IOException( "fallback browse fail" );
+ }
+ log.add( "Fallback browsing to " + uri );
+ } );
+
+ BrowseHarness() {
+ }
+
+ BrowseHarness supported( boolean b ) {
+ supported = b;
+ return this;
+ }
+
+ BrowseHarness browseFailing( boolean b ) {
+ browseFail = b;
+ return this;
+ }
+
+ BrowseHarness launchFailing( boolean b ) {
+ launchFail = b;
+ return this;
+ }
+
+ /**
+ * Invokes an action on the browser, then asserts on the event log
+ *
+ * @param action The action
+ * @param events The expected events
+ */
+ void expect( Consumer action, String... events ) {
+ action.accept( browse );
+ assertEquals(
+ Copy.pasta( events ),
+ Copy.pasta( log ) );
+ log.clear();
+ }
+ }
+}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
index f0dfba1841..9a4ac222b9 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/WriterTest.java
@@ -6,6 +6,9 @@
import static java.util.stream.Collectors.joining;
import static org.junit.jupiter.api.Assertions.assertEquals;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
@@ -17,6 +20,10 @@
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
+import com.github.difflib.DiffUtils;
+import com.github.difflib.patch.AbstractDelta;
+import com.github.difflib.patch.DeltaType;
+import com.github.difflib.patch.Patch;
import com.mastercard.test.flow.Flow;
import com.mastercard.test.flow.builder.Creator;
import com.mastercard.test.flow.builder.Deriver;
@@ -74,34 +81,21 @@ void write() throws Exception {
}
// check file listing of report
- Assertions.assertEquals( ""
- + " 1 x detail/08535047C5991FED96BECB327EAFF8E7.html\n"
- + " 1 x detail/0D943F64D05D282F91C856027DF72923.html\n"
- + " 1 x detail/4C5FFE22176C7ABC272D95A0E5D62262.html\n"
- + " 1 x detail/823B8031950E57346DCE6FFD4BE56F54.html\n"
- + " 1 x index.html\n"
- + " 1 x res/3rdpartylicenses.txt\n"
- + " 28 x res/_digits_..js\n"
- + " 1 x res/common..js\n"
- + " 1 x res/favicon.ico\n"
- + " 1 x res/main..js\n"
- + " 1 x res/polyfills..js\n"
- + " 1 x res/runtime..js\n"
- + " 1 x res/styles..css",
- Files.walk( dir )
- .filter( Files::isRegularFile )
- .map( dir::relativize )
- .map( String::valueOf )
- .map( s -> s.replace( '\\', '/' ) )
- // files produced by the angular build have a content-hash suffix
- // to avoid cached versions being used
- .map( s -> s.replaceAll( "\\.[a-f0-9]{16}\\.(js|css)", "..$1" ) )
- .map( s -> s.replaceAll( "(res/)\\d+(\\..js)", "$1_digits_$2" ) )
- .collect( groupingBy( s -> s ) )
- .entrySet().stream()
- .sorted( comparing( Entry::getKey ) )
- .map( e -> String.format( "%3d x %s", e.getValue().size(), e.getKey() ) )
- .collect( Collectors.joining( "\n" ) ) );
+ Assertions.assertEquals( Copy.pasta(
+ " 1 x detail/08535047C5991FED96BECB327EAFF8E7.html",
+ " 1 x detail/0D943F64D05D282F91C856027DF72923.html",
+ " 1 x detail/4C5FFE22176C7ABC272D95A0E5D62262.html",
+ " 1 x detail/823B8031950E57346DCE6FFD4BE56F54.html",
+ " 1 x index.html",
+ " 1 x res/3rdpartylicenses.txt",
+ " 28 x res/_digits_..js",
+ " 1 x res/common..js",
+ " 1 x res/favicon.ico",
+ " 1 x res/main..js",
+ " 1 x res/polyfills..js",
+ " 1 x res/runtime..js",
+ " 1 x res/styles..css" ),
+ summariseReportFiles( dir ) );
String detail = new String( Files.readAllBytes( dir.resolve(
"detail/4C5FFE22176C7ABC272D95A0E5D62262.html" ) ), UTF_8 );
@@ -172,6 +166,119 @@ void write() throws Exception {
.replaceAll( ":\\d+", ":##" ) );
}
+ private String summariseReportFiles( Path dir ) throws IOException {
+ return Copy.pasta( Files.walk( dir )
+ .filter( Files::isRegularFile )
+ .map( dir::relativize )
+ .map( String::valueOf )
+ .map( s -> s.replace( '\\', '/' ) )
+ // files produced by the angular build have a content-hash suffix
+ // to avoid cached versions being used
+ .map( s -> s.replaceAll( "\\.[a-f0-9]{16}\\.(js|css)", "..$1" ) )
+ .map( s -> s.replaceAll( "(res/)\\d+(\\..js)", "$1_digits_$2" ) )
+ .collect( groupingBy( s -> s ) )
+ .entrySet().stream()
+ .sorted( comparing( Entry::getKey ) )
+ .map( e -> String.format( "%3d x %s", e.getValue().size(), e.getKey() ) )
+ .collect( Collectors.joining( "\n" ) ) );
+ }
+
+ /**
+ * Exercises {@link Writer#writeDuctIndex(Path)}
+ *
+ * @throws Exception on error
+ */
+ @Test
+ void writeDuctIndex() throws Exception {
+
+ Path dir = Paths.get( "target", "WriterTest", "writeDuctIndex" );
+
+ Files.createDirectories( dir );
+
+ Writer.writeDuctIndex( dir );
+
+ // check file listing of report
+ Assertions.assertEquals( Copy.pasta(
+ " 1 x index.html",
+ " 1 x res/3rdpartylicenses.txt",
+ " 28 x res/_digits_..js",
+ " 1 x res/common..js",
+ " 1 x res/favicon.ico",
+ " 1 x res/main..js",
+ " 1 x res/polyfills..js",
+ " 1 x res/runtime..js",
+ " 1 x res/styles..css" ),
+ summariseReportFiles( dir ) );
+ }
+
+ /**
+ * Illustrates the effect of the edit we make to the runtime.js file so that all
+ * javascript files can be hidden away in the res
dir
+ *
+ * @throws Exception on failure
+ */
+ @Test
+ void chunkLoadingPath() throws Exception {
+ Path dir = Paths.get( "target", "WriterTest", "chunkLoadingPath" );
+
+ Files.createDirectories( dir );
+ Writer w = writeReport( dir );
+
+ Path runtimeFile = QuietFiles.list( w.path().resolve( "res" ) )
+ .filter( p -> p.getFileName().toString()
+ .matches( "runtime\\.[0-9a-f]+\\.js" ) )
+ .findAny()
+ .orElseThrow( () -> new IllegalStateException(
+ "Failed to find runtime..js file in " + w.path() ) );
+
+ // The file that was written in the report
+ String written = new String( QuietFiles.readAllBytes( runtimeFile ), UTF_8 );
+ // The resource that was generated in report-ng
+ String resource = resource( runtimeFile.getFileName().toString() );
+
+ // let's examine the changes that we've made to the runtime file
+ Patch patch = DiffUtils.diffInline( resource, written );
+
+ assertEquals( 1, patch.getDeltas().size(),
+ "edit count" );
+ AbstractDelta delta = patch.getDeltas().get( 0 );
+ assertEquals( DeltaType.INSERT, delta.getType(),
+ "edit type" );
+ assertEquals( "[\"res/\"+]", delta.getTarget().getLines().toString(),
+ "inserted lines count" );
+
+ int context = 15;
+ String before = resource.substring(
+ delta.getSource().getPosition() - context,
+ delta.getSource().getPosition() + context )
+ .replaceAll( "\\d", "#" );
+ String after = written.substring(
+ delta.getTarget().getPosition() - context,
+ delta.getTarget().getPosition() + context
+ + delta.getTarget().getLines().get( 0 ).length() )
+ .replaceAll( "\\d", "#" );
+
+ assertEquals( "f),[])),a.u=e=>(###===e?\"commo",
+ before, "raw resource runtime snippet" );
+ assertEquals( "f),[])),a.u=e=>\"res/\"+(###===e?\"commo",
+ after, "written runtime snippet" );
+ }
+
+ private static String resource( String name ) {
+ try( InputStream is = WriterTest.class.getResourceAsStream( name );
+ ByteArrayOutputStream os = new ByteArrayOutputStream() ) {
+ byte[] buff = new byte[8192];
+ int read;
+ while( (read = is.read( buff )) != -1 ) {
+ os.write( buff, 0, read );
+ }
+ return new String( os.toByteArray(), UTF_8 );
+ }
+ catch( Exception e ) {
+ throw new IllegalStateException( "Failed to read resource " + name, e );
+ }
+ }
+
/**
* Demonstrates that the report will cope with a missing basis - we'll hoist to
* the nearest ancestor that is available.
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/AbstractSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/AbstractSequence.java
index d41913d5f9..c44a481456 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/AbstractSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/AbstractSequence.java
@@ -13,7 +13,6 @@
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.junit.jupiter.api.Assertions;
@@ -23,6 +22,8 @@
import org.openqa.selenium.interactions.Actions;
import org.openqa.selenium.support.ui.WebDriverWait;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Superclass for dealing with testing report pages
*
@@ -193,7 +194,7 @@ public S hasUrlArgs( String... expected ) {
.flatMap( a -> Stream.of( a.split( "&" ) ) )
.sorted();
- assertEquals( copypasta( expected ), copypasta( actual ),
+ assertEquals( Copy.pasta( expected ), Copy.pasta( actual ),
"arguments on URL " + current );
return self();
}
@@ -316,32 +317,4 @@ protected static String iconSemantic( WebElement icon ) {
.getAttribute( "svgIcon" );
return ICON_SEMANTICS.getOrDefault( name, name );
}
-
- /**
- * @param content Some strings
- * @return A string that can be trivially copy/pasted into java source
- */
- protected static String copypasta( String... content ) {
- return copypasta( Stream.of( content ) );
- }
-
- /**
- * @param content Some strings
- * @return A string that can be trivially copy/pasted into java source
- */
- protected static String copypasta( Collection content ) {
- return copypasta( content.stream() );
- }
-
- /**
- * @param content Some strings
- * @return A string that can be trivially copy/pasted into java source
- */
- protected static String copypasta( Stream content ) {
- return content
- .map( s -> s.replaceAll( "\r", "" ) )
- .flatMap( s -> Stream.of( s.split( "\n" ) ) )
- .map( s -> s.replaceAll( "\"", "'" ) )
- .collect( Collectors.joining( "\",\n\"", "\"", "\"" ) );
- }
}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ContextSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ContextSequence.java
index 4a2228af77..0aefe6a479 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ContextSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ContextSequence.java
@@ -4,6 +4,8 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the context tab of the
* flow detail page page so the tests can be more readable
@@ -31,8 +33,8 @@ protected ContextSequence self() {
public ContextSequence hasPanels( String... names ) {
trace( "hasPanels", (Object[]) names );
Assertions.assertEquals(
- copypasta( names ),
- copypasta( driver.findElements( By.tagName( "mat-panel-title" ) ).stream()
+ Copy.pasta( names ),
+ Copy.pasta( driver.findElements( By.tagName( "mat-panel-title" ) ).stream()
.map( WebElement::getText ) ),
"Context panel names" );
@@ -49,8 +51,8 @@ public ContextSequence hasPanels( String... names ) {
public ContextSequence hasContent( String panel, String... lines ) {
trace( "hasContent", panel, lines );
Assertions.assertEquals(
- copypasta( lines ),
- copypasta( driver.findElements( By.tagName( "mat-expansion-panel" ) ).stream()
+ Copy.pasta( lines ),
+ Copy.pasta( driver.findElements( By.tagName( "mat-expansion-panel" ) ).stream()
.filter( e -> panel.equals(
e.findElement( By.tagName( "mat-panel-title" ) ).getText() ) )
.findFirst()
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DetailSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DetailSequence.java
index 516a77a30b..c6bf7e9e1e 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DetailSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DetailSequence.java
@@ -11,6 +11,8 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.WebDriverWait;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the detail page so the
* tests can be more readable
@@ -52,8 +54,8 @@ public DetailSequence hasHeader( String... header ) {
trace( "hasHeader", (Object[]) header );
WebElement h = driver.findElement( By.tagName( "mat-toolbar" ) );
Assertions.assertEquals(
- copypasta( header ),
- copypasta( h.getText() ),
+ Copy.pasta( header ),
+ Copy.pasta( h.getText() ),
"Header content" );
return this;
}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DiffSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DiffSequence.java
index 31aa790b9a..1182724746 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DiffSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/DiffSequence.java
@@ -20,6 +20,8 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.WebDriverWait;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the details of interacting with the diff tool
*/
@@ -312,8 +314,8 @@ private DiffSequence checkPairList( WebElement parent, String... lines ) {
.append( "\n" );
}
Assertions.assertEquals(
- copypasta( lines ),
- copypasta( sb.toString() ) );
+ Copy.pasta( lines ),
+ Copy.pasta( sb.toString() ) );
return this;
}
@@ -336,8 +338,8 @@ public DiffSequence changes() {
public DiffSequence hasChangeList( String... expected ) {
trace( "hasChangeList", (Object[]) expected );
Assertions.assertEquals(
- copypasta( expected ),
- copypasta( driver.findElements( By.tagName( "app-pair-select-item" ) ).stream()
+ Copy.pasta( expected ),
+ Copy.pasta( driver.findElements( By.tagName( "app-pair-select-item" ) ).stream()
.map( DiffSequence::flowSelectItemToString ) ) );
return this;
}
@@ -453,8 +455,8 @@ public DiffSequence hasDiff( String... expected ) {
.collect( joining( "\n" ) );
Assertions.assertEquals(
- copypasta( expected ),
- copypasta( formatted ) );
+ Copy.pasta( expected ),
+ Copy.pasta( formatted ) );
return this;
}
@@ -479,8 +481,8 @@ public DiffSequence hasSummary( String... expected ) {
trace( "summary", (Object[]) expected );
Assertions.assertEquals(
- copypasta( expected ),
- copypasta( driver
+ Copy.pasta( expected ),
+ Copy.pasta( driver
.findElement( By.id( "summary" ) )
.findElements( By.tagName( "mat-expansion-panel-header" ) ).stream()
.map( e -> e.getText().replace( "\n", " " ) )
@@ -510,8 +512,8 @@ public DiffSequence analysisDiffs( String... expected ) {
WebElement changes = changed.findElement( By.id( "changes" ) );
assertEquals(
- copypasta( expected ),
- copypasta( changes.findElements( By.tagName(
+ Copy.pasta( expected ),
+ Copy.pasta( changes.findElements( By.tagName(
"mat-expansion-panel-header" ) ).stream()
.map( e -> e.getText().replace( "\n", " " ) ) ) );
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/FlowSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/FlowSequence.java
index 5b60da2746..cd6846be42 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/FlowSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/FlowSequence.java
@@ -16,6 +16,8 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the flow sequence diagram
* so the tests can be more readable
@@ -39,8 +41,8 @@ public FlowSequence hasActors( String... actors ) {
trace( "hasActors", (Object[]) actors );
WebElement seq = driver.findElement( By.tagName( "app-flow-sequence" ) );
Assertions.assertEquals(
- copypasta( actors ),
- copypasta( seq.findElements( By.className( "entity" ) ).stream()
+ Copy.pasta( actors ),
+ Copy.pasta( seq.findElements( By.className( "entity" ) ).stream()
.map( WebElement::getText ) ),
"Sequence diagram actors" );
return this;
@@ -57,8 +59,8 @@ public FlowSequence hasTransmissions( String... tx ) {
WebElement seq = driver.findElement( By.tagName( "app-flow-sequence" ) );
int actors = seq.findElements( By.className( "entity" ) ).size();
Assertions.assertEquals(
- copypasta( tx ),
- copypasta( seq.findElements( By.tagName( "app-seq-action" ) ).stream()
+ Copy.pasta( tx ),
+ Copy.pasta( seq.findElements( By.tagName( "app-seq-action" ) ).stream()
.map( asa -> actionText( actors, asa ) ) ),
"Sequence diagram transmissions" );
return this;
@@ -156,8 +158,8 @@ public FlowSequence hasMessage( String... lines ) {
}
Assertions.assertEquals(
- copypasta( lines ),
- copypasta( actual ) );
+ Copy.pasta( lines ),
+ Copy.pasta( actual ) );
return this;
}
@@ -221,8 +223,8 @@ public FlowSequence hasSearchHits( String... expected ) {
.collect( Collectors.toList() );
assertEquals(
- copypasta( expected ),
- copypasta( actual ),
+ Copy.pasta( expected ),
+ Copy.pasta( actual ),
"Message content search hits" );
return this;
}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/IndexSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/IndexSequence.java
index ec1c3a9e79..d371717ffc 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/IndexSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/IndexSequence.java
@@ -34,6 +34,8 @@
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the index page so the
* tests can be more readable
@@ -184,8 +186,8 @@ public IndexSequence hasFlows( String... flows ) {
.max()
.orElse( 0 );
- assertEquals( copypasta( flows ),
- copypasta( flowItems.stream()
+ assertEquals( Copy.pasta( flows ),
+ Copy.pasta( flowItems.stream()
.map( e -> printFlow( width, e ) ) ) );
return self();
}
@@ -249,8 +251,8 @@ public IndexSequence hasTags( String... expected ) {
trace( "hasTags", (Object[]) expected );
WebElement tagSummary = driver.findElement( By.id( "tag_summary" ) );
assertEquals(
- copypasta( expected ),
- copypasta( Stream.of(
+ Copy.pasta( expected ),
+ Copy.pasta( Stream.of(
tagSummary.findElement( By.tagName( "mat-panel-description" ) )
.findElements( By.tagName( "span" ) ).stream()
.map( IndexSequence::spanIconText )
@@ -406,8 +408,8 @@ public IndexSequence hasMermaidMarkup( String... expected ) {
Transferable after = cb.getContents( this );
assertEquals(
- copypasta( expected ),
- copypasta( after.getTransferData( DataFlavor.stringFlavor ).toString() ),
+ Copy.pasta( expected ),
+ Copy.pasta( after.getTransferData( DataFlavor.stringFlavor ).toString() ),
"mermaid markup" );
}
catch( Exception e ) {
@@ -477,8 +479,8 @@ public IndexSequence hasInteractions( String... expected ) {
String svgSummary = summariseSVG( svg );
assertEquals(
- copypasta( expected ),
- copypasta( svgSummary ),
+ Copy.pasta( expected ),
+ Copy.pasta( svgSummary ),
"interaction diagram structure" );
return self();
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/LogSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/LogSequence.java
index 84cf912acb..60a41aeaa7 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/LogSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/LogSequence.java
@@ -16,6 +16,8 @@
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.ui.WebDriverWait;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the logs tab of the flow
* detail page page so the tests can be more readable
@@ -135,8 +137,8 @@ public LogSequence message( String filter ) {
public LogSequence hasMessages( String... lines ) {
trace( "hasMessages", (Object[]) lines );
Assertions.assertEquals(
- copypasta( lines ),
- copypasta( driver.findElements( By.className( "mat-row" ) ).stream()
+ Copy.pasta( lines ),
+ Copy.pasta( driver.findElements( By.className( "mat-row" ) ).stream()
.map( r -> r.getText().replace( '\n', ' ' ) ) ) );
return this;
}
diff --git a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ResidueSequence.java b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ResidueSequence.java
index 2fda3a7a3a..f0ef991ebd 100644
--- a/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ResidueSequence.java
+++ b/report/report-core/src/test/java/com/mastercard/test/flow/report/seq/ResidueSequence.java
@@ -4,6 +4,8 @@
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
+import com.mastercard.test.flow.report.Copy;
+
/**
* Encapsulates the nuts and bolts of interacting with the residue tab of the
* flow detail page page so the tests can be more readable
@@ -31,8 +33,8 @@ protected ResidueSequence self() {
public ResidueSequence hasPanels( String... names ) {
trace( "hasPanels", (Object[]) names );
Assertions.assertEquals(
- copypasta( names ),
- copypasta( driver.findElements( By.tagName( "mat-panel-title" ) ).stream()
+ Copy.pasta( names ),
+ Copy.pasta( driver.findElements( By.tagName( "mat-panel-title" ) ).stream()
.map( WebElement::getText ) ),
"Residue panel names" );
@@ -49,8 +51,8 @@ public ResidueSequence hasPanels( String... names ) {
public ResidueSequence hasContent( String panel, String... lines ) {
trace( "hasContent", panel, lines );
Assertions.assertEquals(
- copypasta( lines ),
- copypasta( driver.findElements( By.tagName( "mat-expansion-panel" ) ).stream()
+ Copy.pasta( lines ),
+ Copy.pasta( driver.findElements( By.tagName( "mat-expansion-panel" ) ).stream()
.filter( e -> panel.equals(
e.findElement( By.tagName( "mat-panel-title" ) ).getText() ) )
.findFirst()
diff --git a/report/report-ng/pom.xml b/report/report-ng/pom.xml
index ff184aaf60..67fd0b0956 100644
--- a/report/report-ng/pom.xml
+++ b/report/report-ng/pom.xml
@@ -4,7 +4,7 @@
com.mastercard.test.flow
report
- 1.0.1-SNAPSHOT
+ 1.1.0-SNAPSHOT
report-ng
jar
diff --git a/report/report-ng/projects/report/src/app/app.component.html b/report/report-ng/projects/report/src/app/app.component.html
index 787dd749fb..6b3bcfcac4 100644
--- a/report/report-ng/projects/report/src/app/app.component.html
+++ b/report/report-ng/projects/report/src/app/app.component.html
@@ -1,8 +1,9 @@
-
- Failed to grok data as index or flow
- {{error_data | json}}
-
-
\ No newline at end of file
+
+
+
+ Failed to grok data as index or flow
+ {{error_data | json}}
+
\ No newline at end of file
diff --git a/report/report-ng/projects/report/src/app/app.component.spec.ts b/report/report-ng/projects/report/src/app/app.component.spec.ts
index 48feddabf6..97e312e986 100644
--- a/report/report-ng/projects/report/src/app/app.component.spec.ts
+++ b/report/report-ng/projects/report/src/app/app.component.spec.ts
@@ -1,14 +1,20 @@
import { TestBed } from '@angular/core/testing';
import { AppComponent } from './app.component';
+import { DuctService } from './duct.service';
declare var data: any;
describe('AppComponent', () => {
+ let mockDuctService;
beforeEach(async () => {
+ mockDuctService = jasmine.createSpyObj(['startHeartbeat']);
await TestBed.configureTestingModule({
declarations: [
AppComponent
],
+ providers: [
+ { provide: DuctService, useValue: mockDuctService },
+ ],
}).compileComponents();
});
diff --git a/report/report-ng/projects/report/src/app/app.component.ts b/report/report-ng/projects/report/src/app/app.component.ts
index 040b0a4d71..a91a5dd65d 100644
--- a/report/report-ng/projects/report/src/app/app.component.ts
+++ b/report/report-ng/projects/report/src/app/app.component.ts
@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
-import { Flow, Index, isFlow, isIndex } from './types';
+import { DuctFlag, Flow, Index, isDuctFlag, isFlow, isIndex } from './types';
+import { DuctService } from './duct.service';
// global variable defined by inline script element in index.html
// declaration makes it available to typescript code
@@ -18,9 +19,12 @@ declare var data: any;
export class AppComponent {
flow?: Flow;
index?: Index;
+ duct?: DuctFlag;
error: boolean = false;
error_data?: any;
+ constructor(private ductService: DuctService) { }
+
ngOnInit(): void {
if (isIndex(data)) {
this.index = data;
@@ -28,9 +32,15 @@ export class AppComponent {
else if (isFlow(data)) {
this.flow = data;
}
+ else if (isDuctFlag(data)) {
+ this.duct = data;
+ }
else {
this.error = true;
this.error_data = data;
}
+
+ this.ductService.startHeartbeat();
}
+
}
diff --git a/report/report-ng/projects/report/src/app/app.module.ts b/report/report-ng/projects/report/src/app/app.module.ts
index e720ff86f9..9a006739a8 100644
--- a/report/report-ng/projects/report/src/app/app.module.ts
+++ b/report/report-ng/projects/report/src/app/app.module.ts
@@ -28,6 +28,7 @@ import { MatListModule } from '@angular/material/list';
import { MatMenuModule } from '@angular/material/menu';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
+import { MatSliderModule } from '@angular/material/slider';
import { MatTableModule } from '@angular/material/table';
import { MatTabsModule } from '@angular/material/tabs';
import { MatToolbarModule } from '@angular/material/toolbar';
@@ -60,6 +61,9 @@ import { HighlightedTextComponent } from './highlighted-text/highlighted-text.co
import { TextDiffComponent } from './text-diff/text-diff.component';
import { SystemDiagramComponent } from './system-diagram/system-diagram.component';
import { ClipboardModule } from '@angular/cdk/clipboard';
+import { DuctIndexComponent } from './duct-index/duct-index.component';
+import { MatPaginatorModule } from '@angular/material/paginator';
+import { DuctIndexItemComponent } from './duct-index-item/duct-index-item.component';
const routes: Routes = [
{ path: "diff", component: ModelDiffComponent },
@@ -103,6 +107,8 @@ const routes: Routes = [
HighlightedTextComponent,
TextDiffComponent,
SystemDiagramComponent,
+ DuctIndexComponent,
+ DuctIndexItemComponent,
],
imports: [
BrowserAnimationsModule,
@@ -122,10 +128,12 @@ const routes: Routes = [
MatInputModule,
MatListModule,
MatMenuModule,
+ MatPaginatorModule,
MatProgressBarModule,
MatRippleModule,
MatSelectModule,
MatSidenavModule,
+ MatSliderModule,
MatTableModule,
MatTabsModule,
MatToolbarModule,
diff --git a/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.css b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.css
new file mode 100644
index 0000000000..5bd2b6229f
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.css
@@ -0,0 +1,38 @@
+mat-icon {
+ vertical-align: middle;
+}
+
+.time {
+ font-weight: lighter;
+}
+
+.results {
+ font-weight: lighter;
+}
+
+.results {
+ white-space: nowrap;
+}
+
+.pass mat-icon {
+ background-color: rgba(0, 192, 0, 1);
+ color: white;
+ border-radius: 1.5ch;
+}
+
+.fail mat-icon {
+ background-color: rgba(255, 0, 0, 1);
+ color: white;
+ border-radius: 1.5ch;
+}
+
+.skip mat-icon {
+ background-color: rgba(255, 0, 0, 0.5);
+ color: white;
+ border-radius: 1.5ch;
+}
+
+.error mat-icon {
+ color: rgba(255, 0, 0, 1);
+ border-radius: 1.5ch;
+}
\ No newline at end of file
diff --git a/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.html b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.html
new file mode 100644
index 0000000000..d311dafaca
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.html
@@ -0,0 +1,29 @@
+
+
+
+ {{time}}
+
+
+
+ {{report.meta.modelTitle}} | {{report.meta.testTitle}}
+
+
+
+ 0">
+
+ {{report.counts.pass}}
+
+
+
+ {{report.counts.fail}}
+
+ 0">
+
+ {{report.counts.skip}}
+
+ 0">
+
+ {{report.counts.error}}
+
+
+
\ No newline at end of file
diff --git a/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.spec.ts b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.spec.ts
new file mode 100644
index 0000000000..22bdb56cb1
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.spec.ts
@@ -0,0 +1,23 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DuctIndexItemComponent } from './duct-index-item.component';
+
+describe('DuctIndexItemComponent', () => {
+ let component: DuctIndexItemComponent;
+ let fixture: ComponentFixture;
+
+ beforeEach(async () => {
+ await TestBed.configureTestingModule({
+ declarations: [ DuctIndexItemComponent ]
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DuctIndexItemComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.ts b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.ts
new file mode 100644
index 0000000000..c162582579
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index-item/duct-index-item.component.ts
@@ -0,0 +1,29 @@
+import { Component, Input, OnInit } from '@angular/core';
+import { IconEmbedService } from '../icon-embed.service';
+import { Report } from '../duct.service';
+
+@Component({
+ selector: 'app-duct-index-item',
+ templateUrl: './duct-index-item.component.html',
+ styleUrls: ['./duct-index-item.component.css']
+})
+export class DuctIndexItemComponent implements OnInit {
+
+ @Input() report: Report = {
+ meta: { modelTitle: "", testTitle: "", timestamp: 0 },
+ counts: { pass: 0, fail: 0, skip: 0, error: 0 },
+ path: ""
+ };
+ time: string = "";
+
+ constructor(
+ icons: IconEmbedService
+ ) {
+ icons.register("check_circle_outline", "error_outline", "help_outline", "new_releases");
+ }
+
+ ngOnInit(): void {
+ this.time = new Date(this.report.meta.timestamp).toLocaleString();
+ }
+
+}
diff --git a/report/report-ng/projects/report/src/app/duct-index/duct-index.component.css b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.css
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/report/report-ng/projects/report/src/app/duct-index/duct-index.component.html b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.html
new file mode 100644
index 0000000000..c2820e5cc3
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.html
@@ -0,0 +1,8 @@
+
+ Duct
+
+
+
+
+
+
\ No newline at end of file
diff --git a/report/report-ng/projects/report/src/app/duct-index/duct-index.component.spec.ts b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.spec.ts
new file mode 100644
index 0000000000..0bad6ecd44
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.spec.ts
@@ -0,0 +1,29 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { DuctIndexComponent } from './duct-index.component';
+import { DuctService } from '../duct.service';
+
+describe('DuctIndexComponent', () => {
+ let component: DuctIndexComponent;
+ let fixture: ComponentFixture;
+
+ let mockDuctService;
+ beforeEach(async () => {
+ mockDuctService = jasmine.createSpyObj(['loadIndex']);
+ await TestBed.configureTestingModule({
+ declarations: [DuctIndexComponent],
+ providers: [
+ { provide: DuctService, useValue: mockDuctService },
+ ],
+ })
+ .compileComponents();
+
+ fixture = TestBed.createComponent(DuctIndexComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/report/report-ng/projects/report/src/app/duct-index/duct-index.component.ts b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.ts
new file mode 100644
index 0000000000..b71b393e6e
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct-index/duct-index.component.ts
@@ -0,0 +1,25 @@
+import { Component, OnInit } from '@angular/core';
+import { Title } from '@angular/platform-browser';
+import { DuctService, Report } from '../duct.service';
+
+@Component({
+ selector: 'app-duct-index',
+ templateUrl: './duct-index.component.html',
+ styleUrls: ['./duct-index.component.css']
+})
+export class DuctIndexComponent implements OnInit {
+
+ reports: Report[] = [];
+
+ constructor(
+ private ductService: DuctService,
+ private title: Title
+ ) {
+ }
+
+ ngOnInit(): void {
+ this.title.setTitle("Duct");
+ this.ductService.loadIndex(loaded => this.reports = loaded);
+ }
+}
+
diff --git a/report/report-ng/projects/report/src/app/duct.service.ts b/report/report-ng/projects/report/src/app/duct.service.ts
new file mode 100644
index 0000000000..b62efd20ff
--- /dev/null
+++ b/report/report-ng/projects/report/src/app/duct.service.ts
@@ -0,0 +1,102 @@
+import { HttpClient } from '@angular/common/http';
+import { Injectable } from '@angular/core';
+import { tap } from 'rxjs';
+import { Meta, isMeta } from './types';
+
+/**
+ * Service for interaction with the duct report-serving application
+ */
+@Injectable({
+ providedIn: 'root'
+})
+export class DuctService {
+
+ constructor(private http: HttpClient) { }
+
+ /**
+ * Starts the heartbeat. Every 30 seconds we'll
+ * send a GET to /heartbeat. This lets duct know
+ * that someone is still viewing the page so that
+ * it doesn't kill itself. If any of these GET
+ * requests fail, then we'll assume that either
+ * duct has died or that we were never actually
+ * being served by it. We won't bother making any
+ * more requests after that.
+ */
+ startHeartbeat(): void {
+ // try and hit duct's heartbeat endpoint. Duct will kill
+ // itself if it thinks no-one is viewing the pages that it's serving
+ let client = this.http;
+ let path = "/heartbeat";
+ let interval = setInterval(function () {
+ client.get(path, { responseType: "text" })
+ .pipe(tap(
+ body => console.log(path + " yielded " + body),
+ error => {
+ console.error("failed to get heartbeat", error);
+ // either duct is dead or we're not being served by duct.
+ // Either way, there's no point continuing
+ clearInterval(interval);
+ }
+ ))
+ .subscribe(res => {
+ // we don't need to do anything with the response, it's
+ // just important that we make the request
+ });
+ },
+ 30000);
+ }
+
+ /**
+ * Loads the index from duct
+ * @param callback what to do with the index data
+ */
+ loadIndex(callback: (index: Report[]) => void): void {
+ this.http.get('/list')
+ .pipe(tap(
+ body => console.log("fetched ", body),
+ error => {
+ console.error("failed to get /list", error);
+ callback([]);
+ }
+ ))
+ .subscribe(resData => {
+ if (Array.isArray(resData)) {
+ let reports = resData
+ .filter(e => isReport(e))
+ // most recent first
+ .sort((a, b) => b.meta.timestamp - a.meta.timestamp);
+ console.log("loaded " + reports.length + " reports");
+ callback(reports);
+ }
+ });
+ }
+}
+
+export interface Report {
+ meta: Meta;
+ counts: Counts;
+ path: string;
+}
+
+function isReport(data: any): data is Report {
+ return data
+ && isMeta(data.meta)
+ && isCounts(data.counts)
+ && typeof data.path === 'string';
+}
+
+export interface Counts {
+ pass: number;
+ fail: number;
+ skip: number;
+ error: number;
+}
+
+function isCounts(data: any): data is Counts {
+ return data
+ && typeof data.pass === 'number'
+ && typeof data.fail === 'number'
+ && typeof data.skip === 'number'
+ && typeof data.error === 'number';
+}
diff --git a/report/report-ng/projects/report/src/app/types.ts b/report/report-ng/projects/report/src/app/types.ts
index e2a7878d02..05b382eed2 100644
--- a/report/report-ng/projects/report/src/app/types.ts
+++ b/report/report-ng/projects/report/src/app/types.ts
@@ -54,7 +54,7 @@ export interface Meta {
* @param data A data structure
* @returns true if the data has title and timestamp members
*/
-function isMeta(data: any): data is Meta {
+export function isMeta(data: any): data is Meta {
return data
&& data.modelTitle != null
&& typeof data.modelTitle === 'string'
@@ -432,6 +432,25 @@ export function residueAssertionPassed(residue: Residue): boolean {
return (residue.masked.actual ?? '') === (residue.masked.expect ?? '');
}
+/**
+ * Populated onto the index page of duct
+ */
+export interface DuctFlag {
+ type: "duct";
+}
+
+/**
+ * Type guard to turn arbitrary data into our DuctFlag type
+ * @param data A data structure
+ * @returns true if the data matches the DuctFlag structure
+ */
+export function isDuctFlag(data: any): data is DuctFlag {
+ return data
+ && data.type
+ && typeof (data.type) === 'string'
+ && data.type === 'duct';
+}
+
export const empty_message: Message = {
expect: "",
expectBytes: "",
diff --git a/report/report-ng/src/main/resources/no-node/index.html b/report/report-ng/src/main/resources/no-node/index.html
index 9db857f797..b2035c8a9b 100644
--- a/report/report-ng/src/main/resources/no-node/index.html
+++ b/report/report-ng/src/main/resources/no-node/index.html
@@ -10,7 +10,7 @@ Flow data
// START_JSON_DATA
-
+
// END_JSON_DATA