1+ using Keyfactor . Extensions . Orchestrator . RemoteFile . PEM ;
12using Keyfactor . Orchestrators . Extensions ;
3+ using Keyfactor . Orchestrators . Extensions . Interfaces ;
4+ using Moq ;
25
36namespace RemoteFileIntegrationTests
47{
@@ -7,7 +10,19 @@ public class RFPEMInventoryTests : BaseRFPEMTest
710 [ Fact ]
811 public void RFPEM_Inventory_InternalPrivateKey_EmptyStore_Linux_Test0001 ( )
912 {
10- InventoryJobConfiguration config = BuildBaseInvConfig ( ) ;
13+ InventoryJobConfiguration config = BuildBaseInventoryConfig ( ) ;
14+ config . CertificateStoreDetails . ClientMachine = Environment . GetEnvironmentVariable ( "LinuxServer" ) ;
15+ config . CertificateStoreDetails . StorePath = Environment . GetEnvironmentVariable ( "LinuxStorePath" ) ;
16+ config . CertificateStoreDetails . Properties = "{}" ;
17+ //config.CertificateStoreDetails.Properties = JsonConvert.SerializeObject(new Dictionary<string, string?>() { { "SeparatePrivateKeyFilePath", Environment.GetEnvironmentVariable("LinuxStorePath") + "Test0001.key" } });
18+ config . CertificateStoreDetails . ClientMachine = Environment . GetEnvironmentVariable ( "LinuxServer" ) ;
19+
20+ Mock < IPAMSecretResolver > secretResolver = GetMockSecretResolver ( config ) ;
21+
22+ Mock < SubmitInventoryUpdate > submitInventoryUpdate = new Mock < SubmitInventoryUpdate > ( ) ;
23+
24+ Inventory inventory = new Inventory ( secretResolver . Object ) ;
25+ inventory . ProcessJob ( )
1126 }
1227
1328 public override void SetUp ( )
@@ -26,14 +41,17 @@ public override void TearDown()
2641 RemoveStore ( "Test0004" , true , STORE_ENVIRONMENT_ENUM . LINUX ) ;
2742 }
2843
29- private InventoryJobConfiguration BuildBaseInvConfig ( )
44+ private InventoryJobConfiguration BuildBaseInventoryConfig ( )
3045 {
3146 InventoryJobConfiguration config = new InventoryJobConfiguration ( ) ;
3247 config . Capability = "Inventory" ;
3348 config . CertificateStoreDetails = new CertificateStore ( ) ;
3449 config . JobId = new Guid ( ) ;
3550 config . JobProperties = new Dictionary < string , object > ( ) ;
36-
51+ config . ServerUsername = Environment . GetEnvironmentVariable ( "LinuxUserId" ) ;
52+ config . ServerPassword = Environment . GetEnvironmentVariable ( "LinuxUserPassword" ) ;
53+
54+ return config ;
3755 }
3856 }
3957}
0 commit comments