Updates to the Unit Test based on spotbug changes

This commit is contained in:
Cyrus 2024-01-02 10:01:43 -05:00
parent 0e9b2dbd26
commit 0a89846f4c
5 changed files with 14 additions and 15 deletions

View File

@ -172,7 +172,6 @@ public abstract class Certificate extends ArchivableEntity {
@Column(length = CertificateVariables.MAX_PUB_KEY_MODULUS_HEX_LENGTH, nullable = true)
private final String publicKeyModulusHexValue;
@Getter
@Column(length = CertificateVariables.MAX_CERT_LENGTH_BYTES, nullable = false)
private final byte[] signature;

View File

@ -40,7 +40,6 @@ import java.util.UUID;
@Entity
public class SupplyChainValidationSummary extends ArchivableEntity {
@Getter
@ManyToOne
@JoinColumn(name = "device_id")
private final Device device;

View File

@ -32,6 +32,7 @@ public class PortalInfo {
@Getter
@Column(unique = true, nullable = false)
private String name;
@Getter
@Column
private InetAddress ipAddress;
@Getter

View File

@ -328,7 +328,7 @@ public class CertificateTest {
*/
@Test
public void testX509AttributeCertificateParsingExtended()
throws IOException, URISyntaxException {
throws IOException, URISyntaxException, UnsupportedOperationException {
Certificate platformCert = getTestCertificate(
PlatformCredential.class, PlatformCredentialTest.TEST_PLATFORM_CERT_6);
@ -551,7 +551,7 @@ public class CertificateTest {
final Class<T> certificateClass, final String filename,
final EndorsementCredential endorsementCredential,
final List<PlatformCredential> platformCredentials)
throws IOException {
throws IOException, UnsupportedOperationException {
Path certPath;
try {

View File

@ -393,7 +393,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testIsIssuer() throws IOException, URISyntaxException {
public final void testIsIssuer() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_1);
Path certPath = Paths.get(resource.toURI());
@ -414,7 +414,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration() throws IOException, URISyntaxException {
public final void testPlatformConfiguration() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_1);
Path certPath = Paths.get(resource.toURI());
@ -502,7 +502,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration2() throws IOException, URISyntaxException {
public final void testPlatformConfiguration2() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_2);
Path certPath = Paths.get(resource.toURI());
@ -540,7 +540,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration3() throws IOException, URISyntaxException {
public final void testPlatformConfiguration3() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_3);
Path certPath = Paths.get(resource.toURI());
@ -613,7 +613,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration4() throws IOException, URISyntaxException {
public final void testPlatformConfiguration4() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_4);
Path certPath = Paths.get(resource.toURI());
@ -686,7 +686,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration5() throws IOException, URISyntaxException {
public final void testPlatformConfiguration5() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_PLATFORM_CERT2_SPEC2);
Path certPath = Paths.get(resource.toURI());
@ -731,7 +731,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testPlatformConfiguration6() throws IOException, URISyntaxException {
public final void testPlatformConfiguration6() throws IOException, URISyntaxException, UnsupportedOperationException {
URL resource = this.getClass().getResource(TEST_BASE_PLATFORM_CERT_1);
Path certPath = Paths.get(resource.toURI());
@ -758,7 +758,7 @@ public class PlatformCredentialTest {
* @throws IOException if there is a problem reading the cert file
*/
@Test
public final void testSmallNewPlatformCredential() throws URISyntaxException, IOException {
public final void testSmallNewPlatformCredential() throws URISyntaxException, IOException, UnsupportedOperationException {
Path path = Paths.get(this.getClass().getResource(
"/validation/platform_credentials_2/small_attribute_cert_2187.pem").toURI());
PlatformCredential credential = new PlatformCredential(path);
@ -772,7 +772,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testMediumNewPlatformCredential() throws URISyntaxException, IOException {
public final void testMediumNewPlatformCredential() throws URISyntaxException, IOException, UnsupportedOperationException {
Path path = Paths.get(this.getClass().getResource(
"/validation/platform_credentials_2/medium_attribute_cert_2187.pem").toURI());
PlatformCredential credential = new PlatformCredential(path);
@ -786,7 +786,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testLargeNewPlatformCredential() throws URISyntaxException, IOException {
public final void testLargeNewPlatformCredential() throws URISyntaxException, IOException, UnsupportedOperationException {
Path path = Paths.get(this.getClass().getResource(
"/validation/platform_credentials_2/large_attribute_cert_2187.pem").toURI());
PlatformCredential credential = new PlatformCredential(path);
@ -800,7 +800,7 @@ public class PlatformCredentialTest {
* @throws URISyntaxException if there is a problem constructing the cert's URI
*/
@Test
public final void testFlawedNewPlatformCredential() throws URISyntaxException, IOException {
public final void testFlawedNewPlatformCredential() throws URISyntaxException, IOException, UnsupportedOperationException {
Path path = Paths.get(this.getClass().getResource(
"/validation/platform_credentials_2/flawed_attribute_cert_2187.pem").toURI());
PlatformCredential credential = new PlatformCredential(path);