Skip to content

Commit

Permalink
Cover uuid property when starting new launch
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko committed Jun 7, 2021
1 parent 2a73178 commit a24f7ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion test/ReportPortal.Client.IntegrationTests/BaseFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class BaseFixture
//protected readonly Service Service = new Service(new Uri("https://rp.epam.com/api/v1"), "ci-agents-checks", "ba7eb7c8-7b33-42f6-8cf0-e9cd26e717f4");

protected static readonly string Username = "default";
protected readonly Service Service = new Service(new Uri("https://demo.reportportal.io/api/v1"), "default_personal", "c626da9a-c3e7-4355-bc8e-e30986756b88");
protected readonly Service Service = new Service(new Uri("https://demo.reportportal.io/api/v1"), "default_personal", "c0e41c48-f82c-4c6d-945d-6559e2a6c8e5");

//protected static readonly string Username = "ci_check_net_client";
//protected readonly Service Service = new Service(new Uri("https://alpha.reportportal.io/api/v1"), "default_personal", "cd9c39d6-c9a2-45b0-8e48-c4f0151114d0");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using FluentAssertions;
using ReportPortal.Client.Abstractions.Filtering;
using ReportPortal.Client.Abstractions.Models;
using ReportPortal.Client.Abstractions.Requests;
using System;
Expand Down Expand Up @@ -56,8 +55,7 @@ public async Task StartUpdateFinishDeleteLaunch()
var updateMessage = await Service.Launch.UpdateAsync(tempLaunch.Id, new UpdateLaunchRequest()
{
Description = "New description",
Mode = LaunchMode.Debug,
Tags = null
Mode = LaunchMode.Debug
});

Assert.NotNull(launch.Uuid);
Expand Down Expand Up @@ -149,16 +147,19 @@ public async Task UpdateLaunchAttributes()
[Fact]
public async Task StartFinishDeleteFullLaunch()
{
var uuid = Guid.NewGuid().ToString();
var now = DateTime.UtcNow;
var attributes = new List<ItemAttribute> { new ItemAttribute { Key = "a1", Value = "v1" }, new ItemAttribute { Key = "a2", Value = "v2" }, new ItemAttribute { Key = "", Value = "v3" }, new ItemAttribute { Key = null, Value = "v4" } };
var launch = await Service.Launch.StartAsync(new StartLaunchRequest
{
Name = "StartFinishDeleteFullLaunch",
Description = "Desc",
StartTime = now,
Attributes = attributes
Attributes = attributes,
Uuid = uuid
});
Assert.NotNull(launch.Uuid);
Assert.Equal(uuid, launch.Uuid);
var getLaunch = await Service.Launch.GetAsync(launch.Uuid);
Assert.Equal("StartFinishDeleteFullLaunch", getLaunch.Name);
Assert.Equal("Desc", getLaunch.Description);
Expand Down

0 comments on commit a24f7ec

Please sign in to comment.