From 959577568d2b0da27f2331bfd97ced7bd1741384 Mon Sep 17 00:00:00 2001 From: Wei Song <wei@deepbits.com> Date: Tue, 21 Nov 2023 18:07:30 -0800 Subject: [PATCH] use relative path --- pkg/convert/convert_unit_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/convert/convert_unit_test.go b/pkg/convert/convert_unit_test.go index 512eaa6..595dc12 100644 --- a/pkg/convert/convert_unit_test.go +++ b/pkg/convert/convert_unit_test.go @@ -270,7 +270,7 @@ func TestCount(t *testing.T) { } fmt.Printf("convert successfully\n") - converted_json, err := readJSONFile("/home/wei/code/deepbits/sbom-convert/pkg/convert/", prefix) + converted_json, err := readJSONFile("./", prefix) // fmt.Println(converted_json) ori_purls_count := GetPurlsCount(ori_json) @@ -293,7 +293,7 @@ func TestCount(t *testing.T) { t.Errorf("License Check failed. 'Original License Count:', %d, 'Converted License Count:' %d", ori_licenses_count, converted_licenses_count) } - files, err := filepath.Glob("/home/wei/code/deepbits/sbom-convert/pkg/convert/" + prefix + "*.json") + files, err := filepath.Glob(prefix + "*.json") if err != nil { panic(err) }