Merge pull request #7057 from ozhuraki/services-server-test

Make test path a constant
This commit is contained in:
Kazuyoshi Kato 2022-06-15 09:26:39 -07:00 committed by GitHub
commit 43cc649194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,8 +23,10 @@ import (
"github.com/stretchr/testify/assert"
)
const testPath = "/tmp/path/for/testing"
func TestCreateTopLevelDirectoriesErrorsWithSamePathForRootAndState(t *testing.T) {
path := "/tmp/path/for/testing"
path := testPath
err := CreateTopLevelDirectories(&srvconfig.Config{
Root: path,
State: path,
@ -34,7 +36,7 @@ func TestCreateTopLevelDirectoriesErrorsWithSamePathForRootAndState(t *testing.T
func TestCreateTopLevelDirectoriesWithEmptyStatePath(t *testing.T) {
statePath := ""
rootPath := "/tmp/path/for/testing"
rootPath := testPath
err := CreateTopLevelDirectories(&srvconfig.Config{
Root: rootPath,
State: statePath,
@ -43,7 +45,7 @@ func TestCreateTopLevelDirectoriesWithEmptyStatePath(t *testing.T) {
}
func TestCreateTopLevelDirectoriesWithEmptyRootPath(t *testing.T) {
statePath := "/tmp/path/for/testing"
statePath := testPath
rootPath := ""
err := CreateTopLevelDirectories(&srvconfig.Config{
Root: rootPath,