File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
RemoteFileIntegrationTests Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11using Keyfactor . Extensions . Orchestrator . RemoteFile . PEM ;
2+ using Keyfactor . Orchestrators . Common . Enums ;
23using Keyfactor . Orchestrators . Extensions ;
34using Keyfactor . Orchestrators . Extensions . Interfaces ;
45using 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 ( )
You can’t perform that action at this time.
0 commit comments