Skip to content

Commit

Permalink
Release 4.0.0 - Merge pull request #19 from Keyfactor/oid-63530
Browse files Browse the repository at this point in the history
v4.0.0
Oid 63530
  • Loading branch information
doebrowsk authored Oct 24, 2024
2 parents 656ee79 + b0831dd commit af310c5
Show file tree
Hide file tree
Showing 50 changed files with 3,952 additions and 1,070 deletions.
34 changes: 17 additions & 17 deletions AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace AzureEnterpriseApplicationOrchestrator.Tests;

public class AzureEnterpriseApplicationOrchestrator_AzureApp
{
ILogger _logger { get; set;}
ILogger _logger { get; set; }

public AzureEnterpriseApplicationOrchestrator_AzureApp()
{
Expand All @@ -48,7 +48,7 @@ public void AzureApp_Inventory_IntegrationTest_ReturnSuccess()
.WithTenantId(env.TenantId)
.WithApplicationId(env.ApplicationId)
.WithClientSecret(env.ClientSecret)
.WithTargetApplicationId(env.TargetApplicationId)
.WithTargetApplicationApplicationId(env.TargetApplicationApplicationId)
.Build();

// Set up the inventory job configuration
Expand All @@ -57,8 +57,8 @@ public void AzureApp_Inventory_IntegrationTest_ReturnSuccess()
CertificateStoreDetails = new CertificateStore
{
ClientMachine = env.TenantId,
StorePath = env.TargetApplicationId,
Properties = $"{{\"ServerUsername\":\"{env.ApplicationId}\",\"ServerPassword\":\"{env.ClientSecret}\",\"AzureCloud\":\"\"}}"
StorePath = env.TargetApplicationApplicationId,
Properties = $"{{\"ServerUsername\":\"{env.ApplicationId}\",\"ServerPassword\":\"{env.ClientSecret}\",\"AzureCloud\":\"\"}}"
}
};

Expand Down Expand Up @@ -110,22 +110,22 @@ public void AzureApp_Inventory_ProcessJob_ValidClient_ReturnSuccess()
CertificateStoreDetails = new CertificateStore
{
ClientMachine = "test",
StorePath = "test",
Properties = "{\"ServerUsername\":\"test\",\"ServerPassword\":\"test\",\"AzureCloud\":\"test\"}"
StorePath = "test",
Properties = "{\"ServerUsername\":\"test\",\"ServerPassword\":\"test\",\"AzureCloud\":\"test\"}"
},
JobHistoryId = 1
JobHistoryId = 1
};

// Act
JobResult result = inventory.ProcessJob(config, (inventoryItems) =>
{
{
// Assert
Assert.Equal(1, inventoryItems.Count());

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / Build and Test dotnet project

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-generate-readme-workflow / Use private doctool action in public repository

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / Build and Test dotnet project

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)

Check warning on line 123 in AzureEnterpriseApplicationOrchestrator.Tests/AzureApp.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Do not use Assert.Equal() to check for collection size. (https://xunit.github.io/xunit.analyzers/rules/xUnit2013)
Assert.Equal("test", inventoryItems.First().Alias);

_logger.LogInformation("AzureApp_Inventory_ProcessJob_ValidClient_ReturnSuccess - Success");
return true;
});
});

// Assert
Assert.Equal(OrchestratorJobStatusJobResult.Success, result.Result);
Expand All @@ -149,10 +149,10 @@ public void AzureApp_Inventory_ProcessJob_InvalidClient_ReturnFailure()
CertificateStoreDetails = new CertificateStore
{
ClientMachine = "test",
StorePath = "test",
Properties = "{\"ServerUsername\":\"test\",\"ServerPassword\":\"test\",\"AzureCloud\":\"test\"}"
StorePath = "test",
Properties = "{\"ServerUsername\":\"test\",\"ServerPassword\":\"test\",\"AzureCloud\":\"test\"}"
},
JobHistoryId = 1
JobHistoryId = 1
};

bool callbackCalled = false;
Expand Down Expand Up @@ -215,7 +215,7 @@ public void AzureApp_Discovery_ProcessJob_ValidClient_ReturnSuccess()
// Arrange
IAzureGraphClient client = new FakeClient
{
ApplicationIdsAvailableOnFakeTenant = new List<string> { "test" }
ObjectIdsAvailableOnFakeTenant = new List<string> { "test" }
};

// Set up the discovery job with the fake client
Expand Down Expand Up @@ -481,8 +481,8 @@ public void AzureApp_Management_IntegrationTest_ReturnSuccess()
CertificateStoreDetails = new CertificateStore
{
ClientMachine = env.TenantId,
StorePath = env.TargetApplicationId,
Properties = $"{{\"ServerUsername\":\"{env.ApplicationId}\",\"ServerPassword\":\"{env.ClientSecret}\",\"AzureCloud\":\"\"}}"
StorePath = env.TargetApplicationApplicationId,
Properties = $"{{\"ServerUsername\":\"{env.ApplicationId}\",\"ServerPassword\":\"{env.ClientSecret}\",\"AzureCloud\":\"\"}}"
},
JobCertificate = new ManagementJobCertificate
{
Expand All @@ -505,7 +505,7 @@ public void AzureApp_Management_IntegrationTest_ReturnSuccess()
ssCert = AzureEnterpriseApplicationOrchestrator_Client.GetSelfSignedCert(testHostname);

b64Cert = Convert.ToBase64String(ssCert.Export(X509ContentType.Cert));

config.OperationType = CertStoreOperationType.Add;
config.Overwrite = true;
config.JobCertificate = new ManagementJobCertificate
Expand Down Expand Up @@ -554,7 +554,7 @@ static void ConfigureLogging()

LogHandler.Factory = LoggerFactory.Create(builder =>
{
builder.AddNLog();
builder.AddNLog();
});
}
}
Loading

0 comments on commit af310c5

Please sign in to comment.