Skip to content

Commit

Permalink
removed unnecessaries properties for docker containers
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartKleymann committed Nov 17, 2023
1 parent 59c64bc commit a8843db
Showing 1 changed file with 3 additions and 37 deletions.
40 changes: 3 additions & 37 deletions Client.IntegrationTests/ZeebeIntegrationTestHelper.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
using System;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Threading;
using System.Threading.Tasks;
using DotNet.Testcontainers.Builders;
using DotNet.Testcontainers.Configurations;
using DotNet.Testcontainers.Images;
using DotNet.Testcontainers.Networks;
using Grpc.Core;
using Microsoft.Extensions.Logging;
using NLog.Extensions.Logging;
using NUnit.Framework.Constraints;
using Zeebe.Client;
using Zeebe.Client.Api.Builder;
using Zeebe.Client.Impl.Builder;
using IContainer = DotNet.Testcontainers.Containers.IContainer;

Expand Down Expand Up @@ -179,25 +174,7 @@ private IContainer CreateIdentityContainer(INetwork network)
.WithEnvironment("IDENTITY_DATABASE_NAME", "bitnami_keycloak")
.WithEnvironment("IDENTITY_DATABASE_USERNAME", "bn_keycloak")
.WithEnvironment("IDENTITY_DATABASE_PASSWORD", "#3]O?4RGj)DE7Z!9SA5")
.WithEnvironment("KEYCLOAK_INIT_OPERATE_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
.WithEnvironment("KEYCLOAK_INIT_OPERATE_ROOT_URL", "http://localhost:1234/test")
.WithEnvironment("KEYCLOAK_INIT_TASKLIST_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
.WithEnvironment("KEYCLOAK_INIT_TASKLIST_ROOT_URL", "http://localhost:1234/test")
.WithEnvironment("KEYCLOAK_INIT_OPTIMIZE_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
.WithEnvironment("KEYCLOAK_INIT_OPTIMIZE_ROOT_URL", "http://localhost:1234/test")
.WithEnvironment("KEYCLOAK_INIT_WEBMODELER_ROOT_URL", "http://localhost:1234/test")
.WithEnvironment("KEYCLOAK_INIT_CONNECTORS_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
.WithEnvironment("KEYCLOAK_INIT_CONNECTORS_ROOT_URL", "http://localhost:1234/test")
.WithEnvironment("KEYCLOAK_INIT_ZEEBE_NAME", "zeebe")
.WithEnvironment("KEYCLOAK_USERS_0_USERNAME", "demo")
.WithEnvironment("KEYCLOAK_USERS_0_PASSWORD", "demo")
.WithEnvironment("KEYCLOAK_USERS_0_FIRST_NAME", "demo")
.WithEnvironment("KEYCLOAK_USERS_0_EMAIL", "[email protected]")
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_0", "Identity")
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_1", "Optimize")
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_2", "Operate")
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_3", "Tasklist")
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_4", "Web Modeler")
.WithEnvironment("KEYCLOAK_CLIENTS_0_NAME", "zeebe")
.WithEnvironment("KEYCLOAK_CLIENTS_0_ID", "zeebe")
.WithEnvironment("KEYCLOAK_CLIENTS_0_SECRET", "sddh123865WUS)(1%!")
Expand Down Expand Up @@ -244,10 +221,6 @@ public IZeebeClient CreateZeebeClient()
.Build();
}

private static readonly string ServerCertPath =
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "server.crt");


public IZeebeClient CreateAuthenticatedZeebeClient()
{
var loggerFactory = LoggerFactory;
Expand All @@ -265,7 +238,7 @@ public IZeebeClient CreateAuthenticatedZeebeClient()

private async Task AwaitBrokerReadiness()
{
var zeebeClient = (ZeebeClient)client;
var zeebeClient = withIdentity ? (ZeebeClient)CreateAuthenticatedZeebeClient() : (ZeebeClient)client;
await zeebeClient.Connect();
var topologyErrorLogger = LoggerFactory.CreateLogger<ZeebeIntegrationTestHelper>();
var ready = false;
Expand All @@ -283,15 +256,8 @@ private async Task AwaitBrokerReadiness()
}
catch (Exception e)
{
if (e is RpcException rpcException && rpcException.StatusCode == StatusCode.Unauthenticated)
{
ready = true;
}
else
{
// retry
topologyErrorLogger.LogError(e, "Exception in sending topology");
}
topologyErrorLogger.LogError(e, "Exception in sending topology");
// retry
}

continueLoop = !ready && maxCount > retries++;
Expand Down

0 comments on commit a8843db

Please sign in to comment.