mirror of
https://github.com/nsacyber/HIRS.git
synced 2025-01-18 18:56:29 +00:00
Undoing addition to HIRS_AttestationCA build.gradle file; Adding tests to DeviceTest
This commit is contained in:
parent
2b594571b5
commit
09284caa57
@ -29,7 +29,6 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa:3.0.1'
|
||||
implementation 'com.github.darrachequesne:spring-data-jpa-datatables:6.0.1'
|
||||
implementation 'org.springframework.retry:spring-retry:2.0.0'
|
||||
implementation 'org.springframework:spring-test:6.0.11'
|
||||
implementation libs.springdatajpa
|
||||
|
||||
implementation libs.bouncycastle
|
||||
|
@ -151,4 +151,27 @@ public final class DeviceTest {
|
||||
final Device other = new Device(otherName, deviceInfo, HealthStatus.UNKNOWN, AppraisalStatus.Status.UNKNOWN, null, false, null, null);
|
||||
assertEquals(device, other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the default setting of the supply chain validation status is unknown.
|
||||
*/
|
||||
@Test
|
||||
public void testGetDefaultSupplyChainStatus() {
|
||||
String name = "my-laptop";
|
||||
DeviceInfoReport deviceInfo = DeviceInfoReportTest.getTestReport();
|
||||
final Device device = new Device(name, deviceInfo, HealthStatus.UNKNOWN, AppraisalStatus.Status.UNKNOWN, null, false, null, null);
|
||||
assertEquals(AppraisalStatus.Status.UNKNOWN, device.getSupplyChainValidationStatus());
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests that the supply chain validation status getters and setters work.
|
||||
*/
|
||||
@Test
|
||||
public void testSetAndGetSupplyChainStatus() {
|
||||
String name = "my-laptop";
|
||||
DeviceInfoReport deviceInfo = DeviceInfoReportTest.getTestReport();
|
||||
final Device device = new Device(name, deviceInfo, HealthStatus.UNKNOWN, AppraisalStatus.Status.UNKNOWN, null, false, null, null);
|
||||
device.setSupplyChainValidationStatus(AppraisalStatus.Status.PASS);
|
||||
assertEquals(AppraisalStatus.Status.PASS, device.getSupplyChainValidationStatus());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user