From 2daac77194886d376ee56271e293ef582ffc48a9 Mon Sep 17 00:00:00 2001 From: Andrey Ermolov Date: Wed, 22 Nov 2023 04:32:38 +0000 Subject: [PATCH] Bugfix for broken import --- security/advancedtls/crl_provider_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/security/advancedtls/crl_provider_test.go b/security/advancedtls/crl_provider_test.go index bd200475373e..ff94fe1ee679 100644 --- a/security/advancedtls/crl_provider_test.go +++ b/security/advancedtls/crl_provider_test.go @@ -24,6 +24,7 @@ import ( "io" "os" "path/filepath" + "strings" "testing" "time" @@ -144,6 +145,9 @@ func (s) TestFileWatcherCRLProvider(t *testing.T) { const nonCRLFilesUnderCRLDirectory = 15 nonCRLFilesSet := make(map[string]struct{}) customCallback := func(err error) { + if strings.Contains(err.Error(), "BUILD") { + return + } nonCRLFilesSet[err.Error()] = struct{}{} } p, err := NewFileWatcherCRLProvider(FileWatcherOptions{ @@ -311,7 +315,7 @@ func copyFiles(sourcePath string, targetPath string, fileNames []string, t *test t.Fatalf("Can't read dir %v: %v", targetPath, err) } for _, name := range names { - err = os.RemoveAll(filepath.Join(testdata.Path(targetPath), name)) + err = os.RemoveAll(filepath.Join(targetPath, name)) if err != nil { t.Fatalf("Can't remove file %v: %v", name, err) }