use of rhsm.data.OrderNamespace in project rhsm-qe by RedHatQE.
the class CertificateTests method testEntitlementCertContainsExpectedOIDs.
@// update=true, // uncomment to make TestDefinition changes update Polarion testcases through the polarize testcase importer
TestDefinition(projectID = { Project.RHEL6, Project.RedHatEnterpriseLinux7 }, testCaseID = { "RHEL6-20029", "RHEL7-51904" }, level = DefTypes.Level.COMPONENT, component = "subscription-manager", testtype = @TestType(testtype = DefTypes.TestTypes.FUNCTIONAL, subtype1 = DefTypes.Subtypes.RELIABILITY, subtype2 = DefTypes.Subtypes.EMPTY), posneg = PosNeg.POSITIVE, importance = DefTypes.Importance.HIGH, automation = DefTypes.Automation.AUTOMATED, tags = "Tier1")
@Test(description = "Make sure the entitlement cert contains all expected OIDs", groups = { "Tier1Tests", "VerifyEntitlementCertContainsExpectedOIDs_Test", "blockedByBug-744259", "blockedByBug-754426", "blockedByBug-962520", "blockedByBug-997970", "blockedByBug-1021581", "blockedByBug-1443693" }, dataProvider = "getAllAvailableSubscriptionPoolsData", enabled = true)
public // @ImplementsNitrateTest(caseId=)
void testEntitlementCertContainsExpectedOIDs(SubscriptionPool pool) throws JSONException, Exception {
// skip RAM-based subscriptions since they were are not supported on v1 certificates
if (CandlepinTasks.getPoolProductAttributeValue(sm_clientUsername, sm_clientPassword, sm_serverUrl, pool.poolId, "ram") != null) {
throw new SkipException("This test is not designed for RAM-based product subscriptions.");
}
// skip CORES-based subscriptions since they were are not supported on v1 certificates
if (CandlepinTasks.getPoolProductAttributeValue(sm_clientUsername, sm_clientPassword, sm_serverUrl, pool.poolId, "cores") != null) {
throw new SkipException("This test is not designed for CORES-based product subscriptions.");
}
// skip physical_only subscriptions when run on a virtual system
if (CandlepinTasks.isPoolRestrictedToPhysicalSystems(sm_clientUsername, sm_clientPassword, sm_serverUrl, pool.poolId) && Boolean.valueOf(clienttasks.getFactValue("virt.is_guest"))) {
throw new SkipException("This test is not designed for physical_only subscriptions on a virtual machine.");
}
// skip virt_only subscriptions when run on a physical system
if (CandlepinTasks.isPoolRestrictedToVirtualSystems(sm_clientUsername, sm_clientPassword, sm_serverUrl, pool.poolId) && !Boolean.valueOf(clienttasks.getFactValue("virt.is_guest"))) {
throw new SkipException("This test is not designed for virt_only subscriptions on a physical machine.");
}
// adjust quantity for instance_multiplier pools
String instance_multiplier = CandlepinTasks.getPoolProductAttributeValue(sm_clientUsername, sm_clientPassword, sm_serverUrl, pool.poolId, "instance_multiplier");
String quantity = null;
/*if (clienttasks.isPackageVersion("subscription-manager",">=","1.10.3-1"))*/
if (pool.suggested != null) {
if (pool.suggested < 1 && instance_multiplier != null) {
quantity = instance_multiplier;
}
}
// subscribe to the pool and get the EntitlementCert
// File entitlementCertFile = clienttasks.subscribeToSubscriptionPool(pool);
// EntitlementCert entitlementCert = clienttasks.getEntitlementCertFromEntitlementCertFile(entitlementCertFile);
// ^ replaced with the following to save logging/assertion time
SSHCommandResult result = clienttasks.subscribe_(null, null, pool.poolId, null, null, quantity, null, null, null, null, null, null, null);
if (result.getStderr().startsWith("Too many content sets"))
throw new SkipException("This test is only designed for system.certificate_version=1.0 compatible subscriptions.");
// if (result.getStdout().startsWith("Pool is restricted to")) throw new SkipException("This test is not designed for this subscription pool: "+pool); // Pool is restricted to physical systems: '8a9087e3443db08f01443db1847a142a'.
EntitlementCert entitlementCert = clienttasks.getEntitlementCertCorrespondingToSubscribedPool(pool);
Assert.assertNotNull(entitlementCert, "Successfully retrieved the entitlement cert granted after subscribing to pool: " + pool);
// re-scan the entitlement cert using openssl because it better distinguishes between a "" OID value and a null OID value.
entitlementCert = clienttasks.getEntitlementCertFromEntitlementCertFileUsingOpensslX509(entitlementCert.file);
// Commented out the following log of rawCertificate to conserve logFile size
// log.info("Raw entitlement certificate: \n"+entitlementCert.rawCertificate);
boolean allMandatoryOIDsFound = true;
// Reference https://docspace.corp.redhat.com/docs/DOC-30244
// asserting all expected OIDS in the OrderNamespace
// 1.3.6.1.4.1.2312.9.4.1 (Name): Red Hat Enterprise Linux Server
// 1.3.6.1.4.1.2312.9.4.2 (Order Number) : ff8080812c3a2ba8012c3a2cbe63005b
// 1.3.6.1.4.1.2312.9.4.3 (SKU) : MCT0982
// 1.3.6.1.4.1.2312.9.4.4 (Subscription Number) : abcd-ef12-1234-5678 <- SHOULD ONLY EXIST IF ORIGINATED FROM A REGTOKEN
// 1.3.6.1.4.1.2312.9.4.5 (Quantity) : 100
// 1.3.6.1.4.1.2312.9.4.6 (Entitlement Start Date) : 2010-10-25T04:00:00Z
// 1.3.6.1.4.1.2312.9.4.7 (Entitlement End Date) : 2011-11-05T00:00:00Z
// 1.3.6.1.4.1.2312.9.4.8 (Virtualization Limit) : 4 <- ONLY EXISTS WHEN VIRT POOLS ARE TO BE GENERATED
// 1.3.6.1.4.1.2312.9.4.9 (Socket Limit) : None <- ONLY EXISTS WHEN THE SUBSCRIPTION IS USED TO SATISFY HARDWARE
// 1.3.6.1.4.1.2312.9.4.10 (Contract Number): 152341643
// 1.3.6.1.4.1.2312.9.4.11 (Quantity Used): 4
// 1.3.6.1.4.1.2312.9.4.12 (Warning Period): 30
// 1.3.6.1.4.1.2312.9.4.13 (Account Number): 9876543210
// 1.3.6.1.4.1.2312.9.4.14 (Provides Management): 0 (boolean, 1 for true)<- NEEDINFO
// 1.3.6.1.4.1.2312.9.4.15 (Support Level): Premium <- NEEDINFO
// 1.3.6.1.4.1.2312.9.4.16 (Support Type): Level 3 <- NEEDINFO
// 1.3.6.1.4.1.2312.9.4.17 (Stacking Id): 23456 <- ONLY EXISTS WHEN SUBSCRIPTION IS STACKABLE
// 1.3.6.1.4.1.2312.9.4.18 (Virt Only): 1 <- ONLY EXISTS WHEN POOLS ARE INTENTED FOR VIRT MACHINES ONLY
OrderNamespace orderNamespace = entitlementCert.orderNamespace;
if (orderNamespace.productName != null) {
Assert.assertNotNull(orderNamespace.productName, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.1 (Name) is present with value '" + orderNamespace.productName + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.1 (Name) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.orderNumber != null) {
Assert.assertNotNull(orderNamespace.orderNumber, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.2 (Order Number) is present with value '" + orderNamespace.orderNumber + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.2 (Order Number) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.productId != null) {
Assert.assertNotNull(orderNamespace.productId, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.3 (SKU) is present with value '" + orderNamespace.productId + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.3 (SKU) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.subscriptionNumber != null) {
Assert.assertNotNull(orderNamespace.subscriptionNumber, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.4 (Subscription Number) is present with value '" + orderNamespace.subscriptionNumber + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.4 (Subscription Number) is missing");
}
if (orderNamespace.quantity != null) {
Assert.assertNotNull(orderNamespace.quantity, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.5 (Quantity) is present with value '" + orderNamespace.quantity + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.5 (Quantity) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.startDate != null) {
Assert.assertNotNull(orderNamespace.startDate, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.6 (Entitlement Start Date) is present with value '" + orderNamespace.startDate + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.6 (Entitlement Start Date) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.endDate != null) {
Assert.assertNotNull(orderNamespace.endDate, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.7 (Entitlement End Date) is present with value '" + orderNamespace.endDate + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.7 (Entitlement End Date) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.virtualizationLimit != null) {
Assert.assertNotNull(orderNamespace.virtualizationLimit, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.8 (Virtualization Limit) is present with value '" + orderNamespace.virtualizationLimit + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.8 (Virtualization Limit) is missing");
}
if (orderNamespace.socketLimit != null) {
Assert.assertNotNull(orderNamespace.socketLimit, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.9 (Socket Limit) is present with value '" + orderNamespace.socketLimit + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.9 (Socket Limit) is missing");
}
// if (orderNamespace.contractNumber!=null) {Assert.assertNotNull(orderNamespace.contractNumber, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.10 (Contract Number) is present with value '"+ orderNamespace.contractNumber+"'");} else {log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.10 (Contract Number) is missing"); allMandatoryOIDsFound = false;}
if (orderNamespace.contractNumber != null) {
Assert.assertNotNull(orderNamespace.contractNumber, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.10 (Contract Number) is present with value '" + orderNamespace.contractNumber + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.10 (Contract Number) is missing. This subscription was probably granted to a test account.");
}
if (orderNamespace.quantityUsed != null) {
Assert.assertNotNull(orderNamespace.quantityUsed, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.11 (Quantity Used) is present with value '" + orderNamespace.quantityUsed + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.11 (Quantity Used) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.warningPeriod != null) {
Assert.assertNotNull(orderNamespace.warningPeriod, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.12 (Warning Period) is present with value '" + orderNamespace.warningPeriod + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.12 (Warning Period) is missing");
allMandatoryOIDsFound = false;
}
// if (orderNamespace.accountNumber!=null) {Assert.assertNotNull(orderNamespace.accountNumber, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.13 (Account Number) is present with value '"+ orderNamespace.accountNumber+"'");} else {log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.13 (Account Number) is missing"); allMandatoryOIDsFound = false;}
if (orderNamespace.accountNumber != null) {
Assert.assertNotNull(orderNamespace.accountNumber, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.13 (Account Number) is present with value '" + orderNamespace.accountNumber + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.13 (Account Number) is missing. This subscription was probably granted to a test account.");
}
if (orderNamespace.providesManagement != null) {
Assert.assertNotNull(orderNamespace.providesManagement, "Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.14 (Provides Management) is present with value '" + orderNamespace.providesManagement + "'");
} else {
log.warning("Mandatory OrderNamespace OID 1.3.6.1.4.1.2312.9.4.14 (Provides Management) is missing");
allMandatoryOIDsFound = false;
}
if (orderNamespace.supportLevel != null) {
Assert.assertNotNull(orderNamespace.supportLevel, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.15 (Support Level) is present with value '" + orderNamespace.supportLevel + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.15 (Support Level) is missing");
}
if (orderNamespace.supportType != null) {
Assert.assertNotNull(orderNamespace.supportType, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.16 (Support Type) is present with value '" + orderNamespace.supportType + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.16 (Support Type) is missing");
}
if (orderNamespace.stackingId != null) {
Assert.assertNotNull(orderNamespace.stackingId, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.17 (Stacking Id) is present with value '" + orderNamespace.stackingId + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.17 (Stacking Id) is missing");
}
if (orderNamespace.virtOnly != null) {
Assert.assertNotNull(orderNamespace.virtOnly, "Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.18 (Virt Only) is present with value '" + orderNamespace.virtOnly + "'");
} else {
log.warning("Optional OrderNamespace OID 1.3.6.1.4.1.2312.9.4.18 (Virt Only) is missing");
}
for (ProductNamespace productNamespace : entitlementCert.productNamespaces) {
// 1.3.6.1.4.1.2312.9.1.<product_hash>.4 (Provides) : String1, String2, String3
if (productNamespace.name != null) {
Assert.assertNotNull(productNamespace.name, "Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".1 (Name) is present with value '" + productNamespace.name + "'");
} else {
log.warning("Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".1 (Name) is missing");
allMandatoryOIDsFound = false;
}
// if (productNamespace.version!=null) {Assert.assertNotNull(productNamespace.version, "Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1."+productNamespace.id+".2 (Version) is present with value '"+ productNamespace.version+"'");} else {log.warning("Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1."+productNamespace.id+".2 (Version) is missing"); allMandatoryOIDsFound = false;}
if (productNamespace.version != null) {
Assert.assertNotNull(productNamespace.version, "Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".2 (Version) is present with value '" + productNamespace.version + "'");
} else {
log.warning("Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".2 (Version) is missing");
}
if (// the TESTDATA imported into a standalone candlepin does not honor the assertion that the product version OID must be blank since rel-eng creates product certs with valid version outside of candlepin
!sm_serverType.equals(CandlepinType.standalone))
if (productNamespace.version != null) {
Assert.assertEquals(productNamespace.version, "", "Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".2 (Version) can be present but must always be blank.");
}
if (productNamespace.arch != null) {
Assert.assertNotNull(productNamespace.arch, "Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".3 (Architecture) is present with value '" + productNamespace.arch + "'");
} else {
log.warning("Mandatory ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".3 (Architecture) is missing");
allMandatoryOIDsFound = false;
}
if (productNamespace.providedTags != null) {
Assert.assertNotNull(productNamespace.providedTags, "Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".4 (Provides) is present with value '" + productNamespace.providedTags + "'");
} else {
log.warning("Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".4 (Provides) is missing");
}
if (productNamespace.providedTags != null) {
Assert.assertEquals(productNamespace.providedTags, "", "Optional ProductNamespace OID 1.3.6.1.4.1.2312.9.1." + productNamespace.id + ".4 (Provides) can be present but must always be blank.");
}
}
for (ContentNamespace contentNamespace : entitlementCert.contentNamespaces) {
if (!contentNamespace.type.equalsIgnoreCase("yum"))
continue;
// 1.3.6.1.4.1.2312.9.2.<content_hash>.1.10 (Required Tags): TAG1,TAG2,TAG3
if (contentNamespace.name != null) {
Assert.assertNotNull(contentNamespace.name, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.1 (Name) is present with value '" + contentNamespace.name + "'");
} else {
log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.1 (Name) is missing");
allMandatoryOIDsFound = false;
}
if (contentNamespace.label != null) {
Assert.assertNotNull(contentNamespace.label, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.2 (Label) is present with value '" + contentNamespace.label + "'");
} else {
log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.2 (Label) is missing");
allMandatoryOIDsFound = false;
}
// REMOVED //if (contentNamespace.physicalEntitlement!=null) {Assert.assertNotNull(contentNamespace.physicalEntitlement, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.3 (Physical Entitlements) is present with value '"+ contentNamespace.physicalEntitlement+"'");} else {log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.3 (Physical Entitlements) is missing"); allMandatoryOIDsFound = false;}
Assert.assertNull(contentNamespace.physicalEntitlement, "ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.3 (Physical Entitlements) has been removed from the generation of entitlements. Its current value is '" + contentNamespace.physicalEntitlement + "'");
// REMOVED blockedByBug-754426 //if (contentNamespace.flexGuestEntitlement!=null) {Assert.assertNotNull(contentNamespace.flexGuestEntitlement, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.4 (Flex Guest Entitlements) is present with value '"+ contentNamespace.flexGuestEntitlement+"'");} else {log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.4 (Flex Guest Entitlements) is missing"); allMandatoryOIDsFound = false;}
Assert.assertNull(contentNamespace.flexGuestEntitlement, "ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.4 (Flex Guest Entitlements) has been removed from the generation of entitlements. Its current value is '" + contentNamespace.flexGuestEntitlement + "'");
if (contentNamespace.vendorId != null) {
Assert.assertNotNull(contentNamespace.vendorId, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.5 (Vendor ID) is present with value '" + contentNamespace.vendorId + "'");
} else {
log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.5 (Vendor ID) is missing");
allMandatoryOIDsFound = false;
}
if (contentNamespace.downloadUrl != null) {
Assert.assertNotNull(contentNamespace.downloadUrl, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.6 (Download URL) is present with value '" + contentNamespace.downloadUrl + "'");
} else {
log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.6 (Download URL) is missing");
allMandatoryOIDsFound = false;
}
// if (contentNamespace.gpgKeyUrl!=null) {Assert.assertNotNull(contentNamespace.gpgKeyUrl, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.7 (GPG Key URL) is present with value '"+ contentNamespace.gpgKeyUrl+"'");} else {if ("content-emptygpg".equals(contentNamespace.name)||"content-nogpg".equals(contentNamespace.name)) {log.info("Skipping assertion of Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.7 (GPG Key URL) for negative test content '"+contentNamespace.name+"'");} else {log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2."+contentNamespace.hash+".1.7 (GPG Key URL) is missing"); allMandatoryOIDsFound = false;}}
if (contentNamespace.gpgKeyUrl != null) {
Assert.assertNotNull(contentNamespace.gpgKeyUrl, "Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.7 (GPG Key URL) is present with value '" + contentNamespace.gpgKeyUrl + "'");
} else {
log.warning("Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.7 (GPG Key URL) is missing");
}
if (contentNamespace.enabled != null) {
Assert.assertNotNull(contentNamespace.enabled, "Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.8 (Enabled) is present with value '" + contentNamespace.enabled + "'");
} else {
log.warning("Mandatory ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.8 (Enabled) is missing");
allMandatoryOIDsFound = false;
}
if (contentNamespace.metadataExpire != null) {
Assert.assertNotNull(contentNamespace.metadataExpire, "Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.9 (Metadata Expire Seconds) is present with value '" + contentNamespace.metadataExpire + "'");
} else {
log.warning("Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.9 (Metadata Expire Seconds) is missing");
}
if (contentNamespace.requiredTags != null) {
Assert.assertNotNull(contentNamespace.requiredTags, "Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.10 (Required Tags) is present with value '" + contentNamespace.requiredTags + "'");
} else {
log.warning("Optional ContentNamespace OID 1.3.6.1.4.1.2312.9.2." + contentNamespace.hash + ".1.10 (Required Tags) is missing");
}
}
if (!allMandatoryOIDsFound)
Assert.fail("Could not find all mandatory entitlement cert OIDs. (see warnings above)");
}
Aggregations