protected override bool PerformRightScaleTask(CodeActivityContext context) { bool retVal = false; string apiHref = getAPIHref(context); LogInformation("Starting call to create Audit Record on " + auditObjectType.Get(context).ToString() + " with ID of " + auditObjectID.Get(context)); if (base.authClient(context)) { AuditEntry.create(apiHref, auditObjectSummary.Get(context), auditObjectDetail.Get(context)); retVal = true; } LogInformation("Completed creating Audit Record on " + auditObjectType.Get(context).ToString() + " with ID of " + auditObjectID.Get(context)); return(retVal); }
public void createAndAppendTest() { string auditEntryID = AuditEntry.create(string.Format(APIHrefs.ServerArrayById, liveTestServerArrayID), "this is a summary", "here are some details"); Assert.IsNotNull(auditEntryID); string detailResults1 = AuditEntry.detail(auditEntryID); Assert.IsNotNull(detailResults1); bool appendResult = AuditEntry.append(auditEntryID, "this is a more audit detail", "1"); Assert.IsTrue(appendResult); string detailResults2 = AuditEntry.detail(auditEntryID); Assert.IsNotNull(detailResults2); Assert.AreNotEqual(detailResults1, detailResults2); }
public void createAndUpdateTest() { string auditEntryID = AuditEntry.create(string.Format(APIHrefs.ServerArrayById, liveTestServerArrayID), "this is a summary"); Assert.IsNotNull(auditEntryID); AuditEntry ae1 = AuditEntry.show(auditEntryID); Assert.IsNotNull(ae1); bool updateResult = AuditEntry.update(auditEntryID, "this is a new summary"); Assert.IsTrue(updateResult); AuditEntry ae2 = AuditEntry.show(auditEntryID); Assert.IsNotNull(ae2); Assert.AreNotEqual(ae1.summary, ae2.summary); }
public void createDetailedTest() { string auditEntryID = AuditEntry.create(string.Format(APIHrefs.ServerArrayById, liveTestServerArrayID), "this is a summary, fool!", "here are the deets..."); Assert.IsNotNull(auditEntryID); }
public void createDeploymentAuditEntryTest() { string auditEntryID = AuditEntry.create(Utility.deploymentHref(liveTestDeploymentID), "this is an audit entry " + DateTime.Now.ToString()); Assert.IsNotNull(auditEntryID); }
public void createTest() { string auditEntryID = AuditEntry.create(string.Format(APIHrefs.ServerArrayById, liveTestServerArrayID), "this is a summary"); Assert.IsNotNull(auditEntryID); }