Fix mkdir integration test on GCP (#620)

GCP returns a different error here incase of a conflict. This PR fixes
the test.
This commit is contained in:
shreyas-goenka 2023-07-27 15:24:34 +02:00 committed by GitHub
parent 3697dfcb51
commit e4b66833dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ func TestAccFsMkdirWhenFileExistsAtPath(t *testing.T) {
// assert run fails // assert run fails
_, _, err = RequireErrorRun(t, "fs", "mkdir", "dbfs:"+path.Join(tmpDir, "hello")) _, _, err = RequireErrorRun(t, "fs", "mkdir", "dbfs:"+path.Join(tmpDir, "hello"))
// Different backends return different errors (for example: file in s3 vs dbfs) // Different cloud providers return different errors.
regex := regexp.MustCompile(`^Path is a file: .*$|^Cannot create directory .* because .* is an existing file`) 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()) assert.Regexp(t, regex, err.Error())
} }