Skip to content

Commit ac431ff

Browse files
feat: snapshot tests
1 parent c3b0af2 commit ac431ff

9 files changed

+11248
-3421
lines changed

.github/workflows/stage-2-test.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,35 @@ jobs:
9898
path: |
9999
TestResults/**/*.${{ inputs.unit_test_logger_format }}
100100
TestResults/**/coverage.cobertura.xml
101+
102+
snapshot-tests:
103+
name: Snapshot tests
104+
runs-on: ubuntu-latest-8core
105+
steps:
106+
- name: Checkout code
107+
uses: actions/checkout@v4
108+
with:
109+
submodules: true
110+
111+
- name: Authenticate with ACR
112+
113+
- name: Pull images
114+
115+
- name: Run dependencies
116+
run: |
117+
docker compose -f compose.deps.yaml up -d
118+
sleep 20
119+
120+
- name: Run application
121+
run: |
122+
docker compose up -d
123+
sleep 20
124+
125+
- name: Run snapshot tests
126+
run: ./tests/snapshot-tests/run-snapshot-tests.sh
127+
128+
- name: teardown application
129+
run: docker compose down && docker compose -f compose.deps.yaml down
101130

102131
aggregate-test-results:
103132
name: Aggregate results and report

tests/snapshot-tests/AmendStep1/AmendStep1Tests.ValidateCohortDistributionTable.verified.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@
13941394
PreviousFamilyName: PreviousFamilyName 122,
13951395
DateOfBirth: 1970-01-01,
13961396
Gender: 2,
1397-
AddressLine1: Transform to colon:,
1397+
AddressLine1: 122 Spaight Road,
13981398
AddressLine2: Eastbourne,
13991399
AddressLine3: TestAddress,
14001400
AddressLine4: Chelmsford,
@@ -1422,7 +1422,7 @@
14221422
PreviousFamilyName: PreviousFamilyName 122,
14231423
DateOfBirth: 1970-01-01,
14241424
Gender: 2,
1425-
AddressLine1: 122 Spaight Road,
1425+
AddressLine1: Transform to colon:,
14261426
AddressLine2: Eastbourne,
14271427
AddressLine3: TestAddress,
14281428
AddressLine4: Chelmsford,
@@ -2567,7 +2567,7 @@
25672567
PreviousFamilyName: PreviousFamilyName 201,
25682568
DateOfBirth: 1970-01-01,
25692569
Gender: 9,
2570-
AddressLine1: 201 Spaight Road 201 Spaight Road 2,
2570+
AddressLine1: 201 Spaight Road,
25712571
AddressLine2: Eastbourne,
25722572
AddressLine3: TestAddress,
25732573
AddressLine4: Chelmsford,
@@ -2596,7 +2596,7 @@
25962596
PreviousFamilyName: PreviousFamilyName 201,
25972597
DateOfBirth: 1970-01-01,
25982598
Gender: 9,
2599-
AddressLine1: 201 Spaight Road,
2599+
AddressLine1: 201 Spaight Road 201 Spaight Road 2,
26002600
AddressLine2: Eastbourne,
26012601
AddressLine3: TestAddress,
26022602
AddressLine4: Chelmsford,
@@ -3092,7 +3092,7 @@
30923092
CurrentPostingFromDt: 2013-03-19,
30933093
TelephoneNumberHome: 01619999999,
30943094
TelephoneNumberHomeFromDt: 2020-08-18,
3095-
TelephoneNumberMob: Guid_1,
3095+
TelephoneNumberMob: 07888888888,
30963096
TelephoneNumberMobFromDt: 2020-08-18,
30973097
EmailAddressHome: [email protected],
30983098
EmailAddressHomeFromDt: 2020-08-18,
@@ -3121,7 +3121,7 @@
31213121
CurrentPostingFromDt: 2013-03-19,
31223122
TelephoneNumberHome: 01619999999,
31233123
TelephoneNumberHomeFromDt: 2020-08-18,
3124-
TelephoneNumberMob: 07888888888,
3124+
TelephoneNumberMob: Guid_1,
31253125
TelephoneNumberMobFromDt: 2020-08-18,
31263126
EmailAddressHome: [email protected],
31273127
EmailAddressHomeFromDt: 2020-08-18,
@@ -5160,12 +5160,12 @@
51605160
PrimaryCareProvider: A81633,
51615161
PrimaryCareProviderDate: 2003-03-18,
51625162
NamePrefix: LADY,
5163-
GivenName: GivenName 253,
5163+
GivenName: TransformToColon,
51645164
OtherGivenName: OtherGivenName 253,
51655165
FamilyName: FamiliyName 253,
51665166
PreviousFamilyName: PreviousFamilyName 253,
51675167
DateOfBirth: 1970-01-01,
5168-
AddressLine1: Transform to colon:,
5168+
AddressLine1: 253 Spaight Road,
51695169
AddressLine2: Eastbourne,
51705170
AddressLine3: TestAddress,
51715171
AddressLine4: Chelmsford,
@@ -5188,12 +5188,12 @@
51885188
PrimaryCareProvider: A81633,
51895189
PrimaryCareProviderDate: 2003-03-18,
51905190
NamePrefix: LADY,
5191-
GivenName: TransformToColon,
5191+
GivenName: GivenName 253,
51925192
OtherGivenName: OtherGivenName 253,
51935193
FamilyName: FamiliyName 253,
51945194
PreviousFamilyName: PreviousFamilyName 253,
51955195
DateOfBirth: 1970-01-01,
5196-
AddressLine1: 253 Spaight Road,
5196+
AddressLine1: Transform to colon:,
51975197
AddressLine2: Eastbourne,
51985198
AddressLine3: TestAddress,
51995199
AddressLine4: Chelmsford,
@@ -5847,7 +5847,7 @@
58475847
PreviousFamilyName: PreviousFamilyName 171,
58485848
DateOfBirth: 1970-01-01,
58495849
Gender: 9,
5850-
AddressLine1: Transform to colon:,
5850+
AddressLine1: 171 Spaight Road,
58515851
AddressLine2: Eastbourne,
58525852
AddressLine3: TestAddress,
58535853
AddressLine4: Chelmsford,
@@ -5876,7 +5876,7 @@
58765876
PreviousFamilyName: PreviousFamilyName 171,
58775877
DateOfBirth: 1970-01-01,
58785878
Gender: 9,
5879-
AddressLine1: 171 Spaight Road,
5879+
AddressLine1: Transform to colon:,
58805880
AddressLine2: Eastbourne,
58815881
AddressLine3: TestAddress,
58825882
AddressLine4: Chelmsford,
@@ -8859,7 +8859,7 @@
88598859
PreviousFamilyName: PreviousFamilyName 202,
88608860
DateOfBirth: 1970-01-01,
88618861
AddressLine1: 202 Spaight Road,
8862-
AddressLine2: EastbourneEastbourneEastbourneEastb,
8862+
AddressLine2: Eastbourne,
88638863
AddressLine3: TestAddress,
88648864
AddressLine4: Chelmsford,
88658865
AddressLine5: United Kingdom,
@@ -8887,7 +8887,7 @@
88878887
PreviousFamilyName: PreviousFamilyName 202,
88888888
DateOfBirth: 1970-01-01,
88898889
AddressLine1: 202 Spaight Road,
8890-
AddressLine2: Eastbourne,
8890+
AddressLine2: EastbourneEastbourneEastbourneEastb,
88918891
AddressLine3: TestAddress,
88928892
AddressLine4: Chelmsford,
88938893
AddressLine5: United Kingdom,
@@ -11063,7 +11063,7 @@
1106311063
PreviousFamilyName: PreviousFamilyName 215,
1106411064
DateOfBirth: 1970-01-01,
1106511065
Gender: 2,
11066-
AddressLine1: 215 Spaight Road 201 Spaight Road 2,
11066+
AddressLine1: 215 Spaight Road,
1106711067
AddressLine2: Eastbourne,
1106811068
AddressLine3: TestAddress,
1106911069
AddressLine4: Chelmsford,
@@ -11092,7 +11092,7 @@
1109211092
PreviousFamilyName: PreviousFamilyName 215,
1109311093
DateOfBirth: 1970-01-01,
1109411094
Gender: 2,
11095-
AddressLine1: 215 Spaight Road,
11095+
AddressLine1: 215 Spaight Road 201 Spaight Road 2,
1109611096
AddressLine2: Eastbourne,
1109711097
AddressLine3: TestAddress,
1109811098
AddressLine4: Chelmsford,

tests/snapshot-tests/AmendStep1/AmendStep1Tests.ValidateExceptionTable.verified.txt

Lines changed: 0 additions & 140 deletions
Original file line numberDiff line numberDiff line change
@@ -849,46 +849,6 @@
849849
CohortName: ,
850850
IsFatal: 0
851851
},
852-
{
853-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
854-
NhsNumber: 4540245953,
855-
RuleId: 0,
856-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
857-
Category: 5,
858-
ScreeningName: Breast Screening,
859-
CohortName: ,
860-
IsFatal: 0
861-
},
862-
{
863-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
864-
NhsNumber: 4540245953,
865-
RuleId: 54,
866-
RuleDescription: ValidateBsoCode,
867-
Category: 5,
868-
ScreeningName: Breast Screening,
869-
CohortName: ,
870-
IsFatal: 0
871-
},
872-
{
873-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
874-
NhsNumber: 4540904884,
875-
RuleId: 0,
876-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
877-
Category: 5,
878-
ScreeningName: Breast Screening,
879-
CohortName: ,
880-
IsFatal: 0
881-
},
882-
{
883-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
884-
NhsNumber: 4540904884,
885-
RuleId: 54,
886-
RuleDescription: ValidateBsoCode,
887-
Category: 5,
888-
ScreeningName: Breast Screening,
889-
CohortName: ,
890-
IsFatal: 0
891-
},
892852
{
893853
FileName: ,
894854
NhsNumber: 4541268663,
@@ -1079,26 +1039,6 @@
10791039
CohortName: ,
10801040
IsFatal: 0
10811041
},
1082-
{
1083-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
1084-
NhsNumber: 4641948828,
1085-
RuleId: 0,
1086-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
1087-
Category: 5,
1088-
ScreeningName: Breast Screening,
1089-
CohortName: ,
1090-
IsFatal: 0
1091-
},
1092-
{
1093-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
1094-
NhsNumber: 4641948828,
1095-
RuleId: 54,
1096-
RuleDescription: ValidateBsoCode,
1097-
Category: 5,
1098-
ScreeningName: Breast Screening,
1099-
CohortName: ,
1100-
IsFatal: 0
1101-
},
11021042
{
11031043
FileName: ,
11041044
NhsNumber: 4654133208,
@@ -1719,26 +1659,6 @@
17191659
CohortName: ,
17201660
IsFatal: 0
17211661
},
1722-
{
1723-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
1724-
NhsNumber: 4973180149,
1725-
RuleId: 0,
1726-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
1727-
Category: 5,
1728-
ScreeningName: Breast Screening,
1729-
CohortName: ,
1730-
IsFatal: 0
1731-
},
1732-
{
1733-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
1734-
NhsNumber: 4973180149,
1735-
RuleId: 54,
1736-
RuleDescription: ValidateBsoCode,
1737-
Category: 5,
1738-
ScreeningName: Breast Screening,
1739-
CohortName: ,
1740-
IsFatal: 0
1741-
},
17421662
{
17431663
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
17441664
NhsNumber: 4975906791,
@@ -2259,26 +2179,6 @@
22592179
CohortName: ,
22602180
IsFatal: 0
22612181
},
2262-
{
2263-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2264-
NhsNumber: 6698104361,
2265-
RuleId: 0,
2266-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
2267-
Category: 5,
2268-
ScreeningName: Breast Screening,
2269-
CohortName: ,
2270-
IsFatal: 0
2271-
},
2272-
{
2273-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2274-
NhsNumber: 6698104361,
2275-
RuleId: 54,
2276-
RuleDescription: ValidateBsoCode,
2277-
Category: 5,
2278-
ScreeningName: Breast Screening,
2279-
CohortName: ,
2280-
IsFatal: 0
2281-
},
22822182
{
22832183
FileName: ,
22842184
NhsNumber: 6702787324,
@@ -2819,26 +2719,6 @@
28192719
CohortName: ,
28202720
IsFatal: 0
28212721
},
2822-
{
2823-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2824-
NhsNumber: 7334425197,
2825-
RuleId: 0,
2826-
RuleDescription: Participant IGNORED triggered a validation rule, so will not be added to cohort distribution,
2827-
Category: 5,
2828-
ScreeningName: Breast Screening,
2829-
CohortName: ,
2830-
IsFatal: 0
2831-
},
2832-
{
2833-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2834-
NhsNumber: 7334425197,
2835-
RuleId: 54,
2836-
RuleDescription: ValidateBsoCode,
2837-
Category: 5,
2838-
ScreeningName: Breast Screening,
2839-
CohortName: ,
2840-
IsFatal: 0
2841-
},
28422722
{
28432723
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
28442724
NhsNumber: 7335805996,
@@ -2889,16 +2769,6 @@
28892769
CohortName: ,
28902770
IsFatal: 1
28912771
},
2892-
{
2893-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2894-
NhsNumber: 7352230343,
2895-
RuleId: -2146233088,
2896-
RuleDescription: ,
2897-
Category: 5,
2898-
ScreeningName: Breast Screening,
2899-
CohortName: ,
2900-
IsFatal: 1
2901-
},
29022772
{
29032773
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
29042774
NhsNumber: 7352230343,
@@ -2909,16 +2779,6 @@
29092779
CohortName: ,
29102780
IsFatal: 0
29112781
},
2912-
{
2913-
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
2914-
NhsNumber: 7352230343,
2915-
RuleId: 53,
2916-
RuleDescription: Current posting and Primary Care provider contain incompatible values,
2917-
Category: 5,
2918-
ScreeningName: Breast Screening,
2919-
CohortName: ,
2920-
IsFatal: 0
2921-
},
29222782
{
29232783
FileName: ADD_MASTER_1_1B8F53_-_CAAS_BREAST_SCREENING_COHORT.parquet,
29242784
NhsNumber: 7363385254,

0 commit comments

Comments
 (0)