Skip to content

Random unit test failure in TestRepository_GetAnnotatedTag #18444

Closed
@zeripath

Description

@zeripath

Gitea Version

1.15.x/1.16.x/main

Git Version

On CI

Operating System

Linux

How are you running Gitea?

In the CI

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Description

TestRepository_GetAnnotatedTag (0.24s)
    repo_tag_test.go:90: 
        	Error Trace:	repo_tag_test.go:90
        	Error:      	Received unexpected error:
        	            	exit status 128 - fatal: destination path 'tests/repos/repo1_TestRepository_GetTag' already exists and is not an empty directory.

This test and the rest of the tests in this file should be changed to clone into random temporary directories:

func TestRepository_GetAnnotatedTag(t *testing.T) {
bareRepo1Path := filepath.Join(testReposDir, "repo1_bare")
clonedPath, err := cloneRepo(bareRepo1Path, testReposDir, "repo1_TestRepository_GetTag")
assert.NoError(t, err)
defer util.RemoveAll(clonedPath)

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions