Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a8843db

Browse files
committedNov 17, 2023
removed unnecessaries properties for docker containers
1 parent 59c64bc commit a8843db

File tree

1 file changed

+3
-37
lines changed

1 file changed

+3
-37
lines changed
 

‎Client.IntegrationTests/ZeebeIntegrationTestHelper.cs

+3-37
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,14 @@
11
using System;
2-
using System.ComponentModel;
32
using System.IO;
43
using System.Net;
5-
using System.Threading;
64
using System.Threading.Tasks;
75
using DotNet.Testcontainers.Builders;
86
using DotNet.Testcontainers.Configurations;
97
using DotNet.Testcontainers.Images;
108
using DotNet.Testcontainers.Networks;
11-
using Grpc.Core;
129
using Microsoft.Extensions.Logging;
1310
using NLog.Extensions.Logging;
14-
using NUnit.Framework.Constraints;
1511
using Zeebe.Client;
16-
using Zeebe.Client.Api.Builder;
1712
using Zeebe.Client.Impl.Builder;
1813
using IContainer = DotNet.Testcontainers.Containers.IContainer;
1914

@@ -179,25 +174,7 @@ private IContainer CreateIdentityContainer(INetwork network)
179174
.WithEnvironment("IDENTITY_DATABASE_NAME", "bitnami_keycloak")
180175
.WithEnvironment("IDENTITY_DATABASE_USERNAME", "bn_keycloak")
181176
.WithEnvironment("IDENTITY_DATABASE_PASSWORD", "#3]O?4RGj)DE7Z!9SA5")
182-
.WithEnvironment("KEYCLOAK_INIT_OPERATE_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
183-
.WithEnvironment("KEYCLOAK_INIT_OPERATE_ROOT_URL", "http://localhost:1234/test")
184-
.WithEnvironment("KEYCLOAK_INIT_TASKLIST_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
185-
.WithEnvironment("KEYCLOAK_INIT_TASKLIST_ROOT_URL", "http://localhost:1234/test")
186-
.WithEnvironment("KEYCLOAK_INIT_OPTIMIZE_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
187-
.WithEnvironment("KEYCLOAK_INIT_OPTIMIZE_ROOT_URL", "http://localhost:1234/test")
188-
.WithEnvironment("KEYCLOAK_INIT_WEBMODELER_ROOT_URL", "http://localhost:1234/test")
189-
.WithEnvironment("KEYCLOAK_INIT_CONNECTORS_SECRET", "XALaRPl5qwTEItdwCMiPS62nVpKs7dL7")
190-
.WithEnvironment("KEYCLOAK_INIT_CONNECTORS_ROOT_URL", "http://localhost:1234/test")
191177
.WithEnvironment("KEYCLOAK_INIT_ZEEBE_NAME", "zeebe")
192-
.WithEnvironment("KEYCLOAK_USERS_0_USERNAME", "demo")
193-
.WithEnvironment("KEYCLOAK_USERS_0_PASSWORD", "demo")
194-
.WithEnvironment("KEYCLOAK_USERS_0_FIRST_NAME", "demo")
195-
.WithEnvironment("KEYCLOAK_USERS_0_EMAIL", "demo@acme.com")
196-
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_0", "Identity")
197-
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_1", "Optimize")
198-
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_2", "Operate")
199-
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_3", "Tasklist")
200-
.WithEnvironment("KEYCLOAK_USERS_0_ROLES_4", "Web Modeler")
201178
.WithEnvironment("KEYCLOAK_CLIENTS_0_NAME", "zeebe")
202179
.WithEnvironment("KEYCLOAK_CLIENTS_0_ID", "zeebe")
203180
.WithEnvironment("KEYCLOAK_CLIENTS_0_SECRET", "sddh123865WUS)(1%!")
@@ -244,10 +221,6 @@ public IZeebeClient CreateZeebeClient()
244221
.Build();
245222
}
246223

247-
private static readonly string ServerCertPath =
248-
Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "server.crt");
249-
250-
251224
public IZeebeClient CreateAuthenticatedZeebeClient()
252225
{
253226
var loggerFactory = LoggerFactory;
@@ -265,7 +238,7 @@ public IZeebeClient CreateAuthenticatedZeebeClient()
265238

266239
private async Task AwaitBrokerReadiness()
267240
{
268-
var zeebeClient = (ZeebeClient)client;
241+
var zeebeClient = withIdentity ? (ZeebeClient)CreateAuthenticatedZeebeClient() : (ZeebeClient)client;
269242
await zeebeClient.Connect();
270243
var topologyErrorLogger = LoggerFactory.CreateLogger<ZeebeIntegrationTestHelper>();
271244
var ready = false;
@@ -283,15 +256,8 @@ private async Task AwaitBrokerReadiness()
283256
}
284257
catch (Exception e)
285258
{
286-
if (e is RpcException rpcException && rpcException.StatusCode == StatusCode.Unauthenticated)
287-
{
288-
ready = true;
289-
}
290-
else
291-
{
292-
// retry
293-
topologyErrorLogger.LogError(e, "Exception in sending topology");
294-
}
259+
topologyErrorLogger.LogError(e, "Exception in sending topology");
260+
// retry
295261
}
296262

297263
continueLoop = !ready && maxCount > retries++;

0 commit comments

Comments
 (0)
Please sign in to comment.