From f98e672f377f704eec9a1e1e527bd4aa9e713f54 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sat, 9 Dec 2023 12:06:32 +0000 Subject: [PATCH] selfupdate: fix crash in tests if beta not found --- cmd/selfupdate/selfupdate_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/selfupdate/selfupdate_test.go b/cmd/selfupdate/selfupdate_test.go index 92d1d91c7..032c28bec 100644 --- a/cmd/selfupdate/selfupdate_test.go +++ b/cmd/selfupdate/selfupdate_test.go @@ -17,6 +17,7 @@ import ( _ "github.com/rclone/rclone/fstest" // needed to run under integration tests "github.com/rclone/rclone/fstest/testy" "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestGetVersion(t *testing.T) { @@ -76,7 +77,7 @@ func TestInstallOnLinux(t *testing.T) { // Must keep non-standard permissions assert.NoError(t, os.Chmod(path, 0644)) - assert.NoError(t, InstallUpdate(ctx, &Options{Beta: true, Output: path})) + require.NoError(t, InstallUpdate(ctx, &Options{Beta: true, Output: path})) info, err := os.Stat(path) assert.NoError(t, err)