Skip to content

Commit

Permalink
fix: use unique names for each integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
HamedSY committed Jul 25, 2024
1 parent 86f0dde commit 4dc6a92
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ public CreateBranchTests(GiteaCollectionFixture giteaCollectionFixture)
public async Task CreateBranch_ShouldCreateBranchWithCreatedStatusCode_WhenInputsAreProvidedProperly()
{
// Arrange
const string repositoryName = GiteaTestConstants.RepositoryName;
const string repositoryName = "create_branch_repo";
await _repositoryCreator.CreateRepositoryAsync(repositoryName, _giteaCollectionFixture.CancellationToken);

const string newBranchName = "feature/test_new_branch";
const string newBranchName = "create_branch_branch";
var createBranchCommandDto = new CreateBranchCommandDto
{
RepositoryName = repositoryName,
NewBranchName = newBranchName,
OldReferenceName = "main"
OldReferenceName = GiteaTestConstants.DefaultBranch
};

// Act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public GetBranchListTests(GiteaCollectionFixture giteaCollectionFixture)
public async Task GetBranchList_ShouldGetBranchListOfRepo_WhenInputsAreProvidedProperly()
{
// Arrange
const string repositoryName = GiteaTestConstants.RepositoryName;
const string branch1 = "branch1";
const string branch2 = "branch2";
const string branch3 = "branch3";
const string repositoryName = "get_branch_list_repo";
const string branch1 = "get_branch_list_repo_branch_1";
const string branch2 = "get_branch_list_repo_branch_2";
const string branch3 = "get_branch_list_repo_branch_3";
var cancellationToken = _giteaCollectionFixture.CancellationToken;

await _repositoryCreator.CreateRepositoryAsync(repositoryName, cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ public CreatePullRequestTests(GiteaCollectionFixture giteaCollectionFixture)
public async Task CreatePullRequest_ShouldGetBranchListOfRepo_WhenInputsAreProvidedProperly()
{
// Arrange
const string repositoryName = GiteaTestConstants.RepositoryName;
const string branchName = "test_branch";
const string repositoryName = "create_pull_request_repo";
const string branchName = "create_pull_request_branch";
var cancellationToken = _giteaCollectionFixture.CancellationToken;

await _repositoryCreator.CreateRepositoryAsync(repositoryName, cancellationToken);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Mohaymen.GiteaClient.Gitea.Repository.CreateRepository.Dtos;
using Mohaymen.GiteaClient.IntegrationTests.Common.Assertions.Abstractions;
using Mohaymen.GiteaClient.IntegrationTests.Common.Collections.Gitea;
using Mohaymen.GiteaClient.IntegrationTests.Common.Models;

namespace Mohaymen.GiteaClient.IntegrationTests.Gitea.Repository.CreateRepository;

Expand All @@ -31,7 +32,7 @@ public async Task CreateRepository_ShouldCreateRepositoryWithCreatedStatusCode_W
var createRepositoryCommandDto = new CreateRepositoryCommandDto
{
Name = repositoryName,
DefaultBranch = "main",
DefaultBranch = GiteaTestConstants.DefaultBranch,
IsPrivateBranch = true
};

Expand Down

0 comments on commit 4dc6a92

Please sign in to comment.