Skip to content

Commit 4156e17

Browse files
author
Lee Fine
committed
initial-integration-tests
1 parent 1db125f commit 4156e17

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

RemoteFileIntegrationTests/BaseRFPEMTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private void CreateCertificateAndKey()
4444
AsymmetricCipherKeyPair keyPair = keyGen.GenerateKeyPair();
4545

4646
// Define certificate attributes
47-
var certName = new X509Name("CN=Test Certificate");
47+
var certName = new X509Name(Environment.GetEnvironmentVariable("CertificateSubjectDN"));
4848
BigInteger serialNumber = BigInteger.ProbablePrime(120, new Random());
4949

5050
// Validity period

RemoteFileIntegrationTests/RFPEMInventoryTests.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using Keyfactor.Extensions.Orchestrator.RemoteFile.PEM;
2+
using Keyfactor.Orchestrators.Common.Enums;
23
using Keyfactor.Orchestrators.Extensions;
34
using Keyfactor.Orchestrators.Extensions.Interfaces;
45
using Moq;
@@ -22,7 +23,15 @@ public void RFPEM_Inventory_InternalPrivateKey_EmptyStore_Linux_Test0001()
2223
Mock<SubmitInventoryUpdate> submitInventoryUpdate = new Mock<SubmitInventoryUpdate>();
2324

2425
Inventory inventory = new Inventory(secretResolver.Object);
25-
inventory.ProcessJob()
26+
JobResult result = inventory.ProcessJob(config, submitInventoryUpdate.Object);
27+
28+
Assert.Equal(OrchestratorJobStatusJobResult.Success, result.Result);
29+
30+
IInvocation invocation = submitInventoryUpdate.Invocations[0];
31+
List<CurrentInventoryItem> inventoryItems = (List<CurrentInventoryItem>)invocation.Arguments[0];
32+
Assert.Single(inventoryItems);
33+
inventoryItems[0].Certificates).
34+
2635
}
2736

2837
public override void SetUp()

0 commit comments

Comments
 (0)