Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update error message assertions #607

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/files_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down
Loading