Skip to content

Commit

Permalink
test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
v1r3n committed Mar 19, 2024
1 parent e0f530e commit 0b20196
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 72 deletions.
20 changes: 0 additions & 20 deletions Conductor/Api/IIntegrationResourceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,6 @@ public interface IIntegrationResourceApi : IApiAccessor
/// <returns>Integration</returns>
Integration GetIntegrationProvider(string name);

/// <summary>
/// Get Integration provider definitions
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <returns>List<IntegrationDef></returns>
List<IntegrationDef> GetIntegrationProviderDefs();

/// <summary>
/// Get all Integrations Providers
/// </summary>
Expand Down Expand Up @@ -396,16 +386,6 @@ public interface IIntegrationResourceApi : IApiAccessor
/// <returns>Task of Integration</returns>
ThreadTask.Task<Integration> GetIntegrationProviderAsync(string name);

/// <summary>
/// Get Integration provider definitions
/// </summary>
/// <remarks>
///
/// </remarks>
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of List<IntegrationDef></returns>
ThreadTask.Task<List<IntegrationDef>> GetIntegrationProviderDefsAsync();

/// <summary>
/// Get all Integrations Providers
/// </summary>
Expand Down
24 changes: 0 additions & 24 deletions Conductor/Api/IntegrationResourceApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1406,18 +1406,6 @@ public async System.Threading.Tasks.Task<ApiResponse<Integration>> GetIntegratio
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
(Integration)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Integration)));
}

/// <summary>
/// Get Integration provider definitions
/// </summary>
/// <exception cref="Conductor.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>List<IntegrationDef></returns>
public List<IntegrationDef> GetIntegrationProviderDefs()
{
ApiResponse<List<IntegrationDef>> localVarResponse = GetIntegrationProviderDefsWithHttpInfo();
return localVarResponse.Data;
}

/// <summary>
/// Get Integration provider definitions
/// </summary>
Expand Down Expand Up @@ -1468,18 +1456,6 @@ public ApiResponse<List<IntegrationDef>> GetIntegrationProviderDefsWithHttpInfo(
(List<IntegrationDef>)this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List<IntegrationDef>)));
}

/// <summary>
/// Get Integration provider definitions
/// </summary>
/// <exception cref="Conductor.Client.ApiException">Thrown when fails to make API call</exception>
/// <returns>Task of List<IntegrationDef></returns>
public async System.Threading.Tasks.Task<List<IntegrationDef>> GetIntegrationProviderDefsAsync()
{
ApiResponse<List<IntegrationDef>> localVarResponse = await GetIntegrationProviderDefsAsyncWithHttpInfo();
return localVarResponse.Data;

}

/// <summary>
/// Get Integration provider definitions
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Conductor/Client/ApiClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public object Deserialize(RestResponse response, Type type)
}
catch (Exception e)
{
throw new ApiException(500, e.Message);
throw new ApiException(500, e.Message, e);
}
}

Expand Down
25 changes: 0 additions & 25 deletions Tests/Api/IntegrationResourceApiTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,31 +235,6 @@ public async void DeleteAnIntegrationAsyncTest()
Assert.Null(exception);
_performCleanup = false;
}

/// <summary>
/// Test GetIntegrationProviderDefs
/// </summary>
[Fact]
public void GetIntegrationProviderDefs()
{
Setup();
var response = _integrationResourceApi.GetIntegrationProviderDefs();
AssertExtensions.AssertModelResponse<List<IntegrationDef>>(response);
_performCleanup = true;
}

/// <summary>
/// Test GetIntegrationProviderDefsAsync
/// </summary>
[Fact]
public async void GetIntegrationProviderDefsAsync()
{
Setup();
var response = await _integrationResourceApi.GetIntegrationProviderDefsAsync();
AssertExtensions.AssertModelResponse<List<IntegrationDef>>(response);
_performCleanup = true;
}

/// <summary>
/// Test DeleteIntegrationProvider
/// </summary>
Expand Down
6 changes: 4 additions & 2 deletions Tests/Api/WorkflowResourceApiTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,11 @@ public void TestWorkflowOperations()
$"Number of tasks in workflow is {workflow.Tasks.Count} and last task is {workflow.Tasks.Last().ReferenceTaskName}");
Assert.Equal(3, workflow.Tasks.Count);

_testOutputHelper.WriteLine("Searching for correlationId " + correlationId);
// Search for workflows
var searchResults = _workflowClient.Search(start: 0, size: 100, freeText: "*",
query: $"correlationId = '{correlationId}'");
var startTime = DateTimeOffset.UtcNow.ToUnixTimeSeconds() * 1000;
var searchResults = _workflowClient.Search(start: 0, size: 10, freeText: "*",
query: $"correlationId = '{correlationId}' AND startTime > {startTime} AND startTime < {startTime + 86400000}");
_testOutputHelper.WriteLine(
$"Found {searchResults.Results.Count} execution with correlation_id '{correlationId}'");
Assert.Single(searchResults.Results);
Expand Down

0 comments on commit 0b20196

Please sign in to comment.