From e4b66833dd78ad6ab6b0cd71deb7cf0f364b1108 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Thu, 27 Jul 2023 15:24:34 +0200 Subject: [PATCH] Fix mkdir integration test on GCP (#620) GCP returns a different error here incase of a conflict. This PR fixes the test. --- internal/fs_mkdir_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/fs_mkdir_test.go b/internal/fs_mkdir_test.go index 137750e2..32d1d9c8 100644 --- a/internal/fs_mkdir_test.go +++ b/internal/fs_mkdir_test.go @@ -111,7 +111,7 @@ func TestAccFsMkdirWhenFileExistsAtPath(t *testing.T) { // assert run fails _, _, err = RequireErrorRun(t, "fs", "mkdir", "dbfs:"+path.Join(tmpDir, "hello")) - // Different backends return different errors (for example: file in s3 vs dbfs) - regex := regexp.MustCompile(`^Path is a file: .*$|^Cannot create directory .* because .* is an existing file`) + // Different cloud providers return different errors. + regex := regexp.MustCompile(`^Path is a file: .*$|^Cannot create directory .* because .* is an existing file$|^mkdirs\(hadoopPath: .*, permission: rwxrwxrwx\): failed$`) assert.Regexp(t, regex, err.Error()) }