Skip to content

Commit

Permalink
v0.3.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
CDR-AndrewG authored Jun 9, 2022
2 parents 798e85e + 56612e8 commit 5219ee6
Show file tree
Hide file tree
Showing 9 changed files with 344 additions and 315 deletions.
55 changes: 38 additions & 17 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,17 @@ jobs:
with:
path: ./mock-data-holder

- name: Checkout Register (Main Branch)
uses: actions/checkout@v2
- name: Pull Mock Register Image (main)
if: ${{ github.ref == 'refs/heads/main' }}
with:
repository: ConsumerDataRight/mock-register
ref: main
path: ./mock-register

- name: Checkout Register (Develop Branch)
uses: actions/checkout@v2
run: |
docker pull consumerdataright/mock-register:main
docker image tag consumerdataright/mock-register:main mock-register:latest
- name: Pull Mock Register Image (develop)
if: ${{ github.ref != 'refs/heads/main' }}
with:
repository: ConsumerDataRight/mock-register
ref: develop
path: ./mock-register
run: |
docker pull consumerdataright/mock-register:develop
docker image tag consumerdataright/mock-register:develop mock-register:latest
- name: List contents
if: always()
Expand All @@ -67,10 +63,7 @@ jobs:
cd mock-data-holder
ls
cd ..
# Build mock-register image
- name: Build the mock-register image
run: |
docker build ./mock-register/Source --file ./mock-register/Source/Dockerfile --tag mock-register:latest
# Build mock-data-holder image
- name: Build the mock-data-holder image
run: |
Expand All @@ -87,19 +80,47 @@ jobs:
- name: List Docker images
run: |
docker images
# Run unit tests
- name: Run unit tests
run: |
docker-compose -f './mock-data-holder/Source/docker-compose.UnitTests.yml' up --abort-on-container-exit --exit-code-from mock-data-holder-unit-tests
# Remove unit tests
- name: Remove unit tests
run: |
docker-compose -f './mock-data-holder/Source/docker-compose.UnitTests.yml' down
# Run integration tests
- name: Run integration tests
run: |
docker-compose -f './mock-data-holder/Source/docker-compose.IntegrationTests.yml' up --abort-on-container-exit --exit-code-from mock-data-holder-integration-tests
# Remove integration tests
- name: Remove integration tests
run: |
docker-compose -f './mock-data-holder/Source/docker-compose.IntegrationTests.yml' down
# Archive unit test results
- name: Archive unit test results
uses: actions/upload-artifact@v2
if: always()
with:
name: unit-test-results
path: ${{ github.workspace }}/mock-data-holder/Source/_temp/mock-data-holder-unit-tests/testresults

# Archive integration test results
- name: Archive integration test results
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-results
path: ${{ github.workspace }}/mock-data-holder/Source/_temp/mock-data-holder-integration-tests/testresults

# Archive mock data holder logs
- name: Archive mock data holder logs
uses: actions/upload-artifact@v2
if: always()
with:
name: integration-test-artifacts
path: ${{ github.workspace }}/mock-data-holder/Source/_temp/mock-data-holder/tmp
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.3.1] - 2022-06-09
### Changed
- Account transactions dates and person information in seed data.
- Build and Test action to download containers from docker hub.

### Fixed
- Issuing of refresh_token when FapiComplianceLevel is set to Fapi1Phase2.
- Intermittent issue when creating the LogEventsManageAPI database table.

## [0.3.0] - 2022-05-25
### Changed
Expand Down Expand Up @@ -42,4 +50,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.1.0] - 2021-10-01

### Added
- First release of the Mock Data Holder.
- First release of the Mock Data Holder.
2 changes: 1 addition & 1 deletion CertificateManagement/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Certificates play an important part in the CDR ecosystem to establish trust between participants and protect communications. **DigiCert** is the Certificate Authority (CA) for the CDR and the ACCC is responsible for provisioning DigiCert certificates to participants during the on-boarding process.

For more information, consult the [Certificate Management](https://cdr-register.github.io/register/#certificate-management) section of the Register Design.
For more information, consult the [Certificate Management](https://consumerdatastandardsaustralia.github.io/standards/#certificate-management) section of the Consumer Data Standards.

The Mock Data Holder will mimic the behaviour of a data holder in the CDR ecosystem and therefore will use certificates in its interactions. However, the use of DigiCert for this purpose is not feasible or scalable so an alternative approach is adopted.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ protected override async Task<string> CreateIdTokenFromRefreshTokenRequestAsync(

if (request.AuthorizationCode != null)
{
if (int.TryParse(request.AuthorizationCode.Subject.Claims.FirstOrDefault(x => x.Type == StandardClaims.SharingDurationExpiresAt)?.Value, out int sharingExpiresAt))
if (int.TryParse(request.AuthorizationCode.Subject.Claims.FirstOrDefault(x => x.Type == StandardClaims.Expiry)?.Value, out int sharingExpiresAt))
{
createRefreshToken = sharingExpiresAt > DateTimeOffset.UtcNow.ToUnixTimeSeconds();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public US15350_MDH_BankingAPI_GetTransactions(RegisterSoftwareProductFixture fix
private const string FOO_GUID = "F0000000-F000-F000-F000-F00000000000";

// Note: These default dates are based on the current seed-data.json file to select a valid data set.
private static string DEFAULT_EFFECTIVENEWESTTIME => "2021-06-01T00:00:00Z";
private static string DEFAULT_EFFECTIVEOLDESTTIME => "2021-03-01T00:00:00Z";
private static string DEFAULT_EFFECTIVENEWESTTIME => "2022-06-01T00:00:00Z";
private static string DEFAULT_EFFECTIVEOLDESTTIME => "2022-03-01T00:00:00Z";

private static (string, int) GetExpectedResponse(
string accountId, string? accessToken,
Expand Down Expand Up @@ -345,9 +345,9 @@ public async Task AC04_Get_WithPageSize5_AndPage5_ShouldRespondWith_200OK_Page5O
}

[Theory]
[InlineData("2021-05-25T00:00:00.000Z", 2)]
[InlineData("2021-05-26T00:00:00.000Z", 0)]
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2021-05-01 for the data seeded into the database will be moved to now
[InlineData("2022-05-25T00:00:00.000Z", 2)]
[InlineData("2022-05-26T00:00:00.000Z", 0)]
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2022-05-01 for the data seeded into the database will be moved to now
// SO THE ABOVE TEST DATES MUST ALSO BE MOVED as per the OffsetDates as set in 010 Repository > ...\Repository\Infrastructure\Extensions.cs
// else this test will FAIL.
public async Task AC05_Get_WithOldestTime_ShouldRespondWith_200OK_FilteredRecords(string oldestTime, int expectedRecordCount)
Expand All @@ -356,9 +356,9 @@ public async Task AC05_Get_WithOldestTime_ShouldRespondWith_200OK_FilteredRecord
}

[Theory]
[InlineData("2021-03-01T00:00:00.000Z", 0)]
[InlineData("2021-03-02T00:00:00.000Z", 2)]
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2021-05-01 for the data seeded into the database will be moved to now
[InlineData("2022-03-01T00:00:00.000Z", 0)]
[InlineData("2022-03-02T00:00:00.000Z", 2)]
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2022-05-01 for the data seeded into the database will be moved to now
// SO THE ABOVE TEST DATES MUST ALSO BE MOVED as per the OffsetDates as set in 010 Repository > ...\Repository\Infrastructure\Extensions.cs
// else this test will FAIL.
public async Task AC05b_Get_WithNewestTime_ShouldRespondWith_200OK_FilteredRecords(string newestTime, int expectedRecordCount)
Expand Down Expand Up @@ -397,7 +397,7 @@ public async Task AC09_Get_WithMaxAmount_ShouldRespondWith_200OK_FilteredRecords
[Theory]
[InlineData("IOU", 2)]
[InlineData("iou", 2)]
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2021-05-01 for the data seeded into the database will be moved to now
// NB: If the appsettings.ENV.json > SeedData > OffsetDates = true - then the reference date of 2022-05-01 for the data seeded into the database will be moved to now
// THIS TEST WILL FAIL.
public async Task AC10_Get_WithText_ShouldRespondWith_200OK_FilteredRecords(string text, int expectedRecordCount)
{
Expand Down Expand Up @@ -466,7 +466,7 @@ await Test(ACCOUNTID_JANE_WILSON, TokenType.JANE_WILSON,
}

[Theory]
[InlineData("2021-04-01T00:00:00.000Z", HttpStatusCode.OK)]
[InlineData("2022-04-01T00:00:00.000Z", HttpStatusCode.OK)]
[InlineData("foo", HttpStatusCode.BadRequest)]
public async Task AC15_Get_WithInvalidField_ShouldRespondWith_400BadRequest_InvalidFieldErrorResponse(string oldestTime, HttpStatusCode expectedStatusCode)
{
Expand Down
Loading

0 comments on commit 5219ee6

Please sign in to comment.