Rename test folder to tests

Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Carlos Eduardo Arango Gutierrez
2025-01-21 11:00:25 +01:00
committed by Evan Lezar
parent 069926e4b6
commit 868f385a01
7 changed files with 100 additions and 54 deletions

View File

@@ -19,14 +19,14 @@ func TestMaintainSpec(t *testing.T) {
}
for _, f := range files {
inputSpecPath := filepath.Join(moduleRoot, "test/input", f)
inputSpecPath := filepath.Join(moduleRoot, "tests/input", f)
spec := NewFileSpec(inputSpecPath).(*fileSpec)
_, err := spec.Load()
require.NoError(t, err)
outputSpecPath := filepath.Join(moduleRoot, "test/output", f)
outputSpecPath := filepath.Join(moduleRoot, "tests/output", f)
spec.path = outputSpecPath
spec.Flush()

View File

@@ -36,7 +36,7 @@ func TestGetFileList(t *testing.T) {
}{
{
description: "returns list of CSV files",
root: "test/input/csv_samples/",
root: "tests/input/csv_samples/",
files: []string{
"jetson.csv",
"simple_wrong.csv",
@@ -46,15 +46,15 @@ func TestGetFileList(t *testing.T) {
},
{
description: "handles empty folder",
root: "test/input/csv_samples/empty",
root: "tests/input/csv_samples/empty",
},
{
description: "handles non-existent folder",
root: "test/input/csv_samples/NONEXISTENT",
root: "tests/input/csv_samples/NONEXISTENT",
},
{
description: "handles non-existent folder root",
root: "/NONEXISTENT/test/input/csv_samples/",
root: "/NONEXISTENT/tests/input/csv_samples/",
},
}

View File

@@ -46,7 +46,7 @@ func TestMain(m *testing.M) {
if err != nil {
log.Fatalf("error in test setup: could not get module root: %v", err)
}
testBinPath := filepath.Join(moduleRoot, "test", "bin")
testBinPath := filepath.Join(moduleRoot, "tests", "bin")
// Set the environment variables for the test
os.Setenv("PATH", test.PrependToPath(testBinPath, moduleRoot))