Skip to content

Commit

Permalink
Add Darwin test for commissioning with an origin VID in the CD.
Browse files Browse the repository at this point in the history
This uses the pieces put in place in
project-chip#27616
  • Loading branch information
bzbarsky-apple committed Jul 11, 2023
1 parent bdee512 commit 60f9ab7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/darwin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
run: |
mkdir -p /tmp/darwin/framework-tests
../../../out/debug/chip-all-clusters-app --interface-id -1 > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) &
../../../out/debug/chip-all-clusters-app --interface-id -1 --dac_provider credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) &
# Make sure each ota-requestor is using a different port, discriminator, and KVS from
# all-clusters-app and from other requestors.
#
Expand Down
8 changes: 4 additions & 4 deletions src/darwin/Framework/CHIPTests/MTRPairingTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
static const uint16_t kPairingTimeoutInSeconds = 10;
static const uint16_t kTimeoutInSeconds = 3;
static uint64_t sDeviceId = 0x12344321;
static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00";
static NSString * kOnboardingPayload = @"MT:Y.K90SO527JA0648G00";
static const uint16_t kLocalPort = 5541;
static const uint16_t kTestVendorId = 0xFFF1u;

Expand Down Expand Up @@ -65,10 +65,10 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle
{
[self.expectation fulfill];
// Hard-coded to what our example server app uses for now.
// TODO: Build an example that uses the "origin" bits that allow a DAC and
// CD to have different vendor IDs, and verify things here.
XCTAssertEqualObjects(attestationDeviceInfo.vendorID, @(0xFFF2));
XCTAssertEqualObjects(attestationDeviceInfo.productID, @(0x8001));
XCTAssertEqualObjects(attestationDeviceInfo.basicInformationVendorID, @(0xFFF1));
XCTAssertEqualObjects(attestationDeviceInfo.basicInformationProductID, @(0x8001));
XCTAssertEqualObjects(attestationDeviceInfo.basicInformationProductID, @(0x8000));
[controller continueCommissioningDevice:opaqueDeviceHandle ignoreAttestationFailure:NO error:nil];
}

Expand Down

0 comments on commit 60f9ab7

Please sign in to comment.