Date: Mon, 18 Aug 2025 14:31:06 +1000
Subject: [PATCH 6/7] chore: fix incorrect ordering of OS options in docs
(#19384)
On https://coder.com/docs/install/uninstall at present we order the top
OS listing as "Linux | macOS | Windows", while in the `Coder settings,
cache, and the optional built-in PostgreSQL database` paragraph towards
the bottom of the page we change to using "macOS | Linux | Windows" for
some reason. This PR moves Linux to be listed first instead of macOS in
the bottom paragraph to match the ordering of the top section.
---
docs/install/uninstall.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/install/uninstall.md b/docs/install/uninstall.md
index 7a94b22b25f6c..c04bd6e9c2723 100644
--- a/docs/install/uninstall.md
+++ b/docs/install/uninstall.md
@@ -74,17 +74,17 @@ performing the following step or copying the directory to another location.
-## macOS
+## Linux
```shell
-rm -rf ~/Library/Application\ Support/coderv2
+rm -rf ~/.config/coderv2
+rm -rf ~/.cache/coder
```
-## Linux
+## macOS
```shell
-rm -rf ~/.config/coderv2
-rm -rf ~/.cache/coder
+rm -rf ~/Library/Application\ Support/coderv2
```
## Windows
From fdc9dfae89bad7775a8a84b5a056d1f20eac76ba Mon Sep 17 00:00:00 2001
From: Ethan <39577870+ethanndickson@users.noreply.github.com>
Date: Mon, 18 Aug 2025 15:25:52 +1000
Subject: [PATCH 7/7] test(coderd/database/dbpurge): use mock db in `TestPurge`
(#19386)
Closes https://github.com/coder/internal/issues/906
This test was using dbmem until we removed it. The test just makes sure the background job runs at all, so a mock db continues to be fine here.
No other tests in this package used dbmem, so this is the only test I've changed.
---
coderd/database/dbpurge/dbpurge_test.go | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/coderd/database/dbpurge/dbpurge_test.go b/coderd/database/dbpurge/dbpurge_test.go
index 1d57a87e68f48..b3be0f82631c0 100644
--- a/coderd/database/dbpurge/dbpurge_test.go
+++ b/coderd/database/dbpurge/dbpurge_test.go
@@ -15,12 +15,14 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.uber.org/goleak"
+ "go.uber.org/mock/gomock"
"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"
"github.com/coder/coder/v2/coderd/database"
"github.com/coder/coder/v2/coderd/database/dbgen"
+ "github.com/coder/coder/v2/coderd/database/dbmock"
"github.com/coder/coder/v2/coderd/database/dbpurge"
"github.com/coder/coder/v2/coderd/database/dbrollup"
"github.com/coder/coder/v2/coderd/database/dbtestutil"
@@ -46,8 +48,9 @@ func TestPurge(t *testing.T) {
// We want to make sure dbpurge is actually started so that this test is meaningful.
clk := quartz.NewMock(t)
done := awaitDoTick(ctx, t, clk)
- db, _ := dbtestutil.NewDB(t)
- purger := dbpurge.New(context.Background(), testutil.Logger(t), db, clk)
+ mDB := dbmock.NewMockStore(gomock.NewController(t))
+ mDB.EXPECT().InTx(gomock.Any(), database.DefaultTXOptions().WithID("db_purge")).Return(nil).Times(2)
+ purger := dbpurge.New(context.Background(), testutil.Logger(t), mDB, clk)
<-done // wait for doTick() to run.
require.NoError(t, purger.Close())
}