From d6ce6fb4f29bf94cb3483bee5a5c1d39b13236b2 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Wed, 6 Sep 2023 08:56:03 +0200 Subject: [PATCH] Update error message assertions Error messages changed in #592 and got reverted in #604. This fixes the nightlies. --- internal/files_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/files_test.go b/internal/files_test.go index d2949f6c5..0ae1202d3 100644 --- a/internal/files_test.go +++ b/internal/files_test.go @@ -103,7 +103,7 @@ func TestAccDbfsOpen(t *testing.T) { // Upload through [io.Writer] should fail because the file exists. { _, err := w.Dbfs.Open(ctx, path, files.FileModeWrite) - require.ErrorContains(t, err, "dbfs open: non-retriable error: A file or directory already exists at the input path") + require.ErrorContains(t, err, "dbfs open: A file or directory already exists at the input path") } // Upload through [io.ReadFrom] with overwrite bit set. @@ -170,11 +170,11 @@ func TestAccDbfsOpenDirectory(t *testing.T) { // Try to open the directory for writing. _, err = w.Dbfs.Open(ctx, path, files.FileModeWrite) - assert.ErrorContains(t, err, "dbfs open: non-retriable error: A file or directory already exists") + assert.ErrorContains(t, err, "dbfs open: A file or directory already exists") // Try to open the directory for writing with overwrite flag set. _, err = w.Dbfs.Open(ctx, path, files.FileModeWrite|files.FileModeOverwrite) - assert.ErrorContains(t, err, "dbfs open: non-retriable error: A file or directory already exists") + assert.ErrorContains(t, err, "dbfs open: A file or directory already exists") } func TestAccDbfsReadFileWriteFile(t *testing.T) {