Skip to content

Commit a245128

Browse files
committed
Fix test to use Add instead of unexported save
Co-authored-by: Isaac
1 parent e12f437 commit a245128

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

experimental/ssh/internal/sessions/sessions_test.go

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,20 @@ func TestLoadEmpty(t *testing.T) {
1919
assert.Empty(t, store.Sessions)
2020
}
2121

22-
func TestSaveAndLoad(t *testing.T) {
22+
func TestAddAndLoad(t *testing.T) {
2323
tmpDir := t.TempDir()
2424
t.Setenv("HOME", tmpDir)
2525
t.Setenv("USERPROFILE", tmpDir)
2626

27-
store := &SessionStore{
28-
Sessions: []Session{
29-
{
30-
Name: "gpu-a10-abcd1234",
31-
Accelerator: "GPU_1xA10",
32-
WorkspaceHost: "https://test.databricks.com",
33-
CreatedAt: time.Date(2026, 3, 10, 12, 0, 0, 0, time.UTC),
34-
ClusterID: "0310-120000-abc",
35-
},
36-
},
27+
s := Session{
28+
Name: "gpu-a10-abcd1234",
29+
Accelerator: "GPU_1xA10",
30+
WorkspaceHost: "https://test.databricks.com",
31+
CreatedAt: time.Date(2026, 3, 10, 12, 0, 0, 0, time.UTC),
32+
ClusterID: "0310-120000-abc",
3733
}
3834

39-
err := Save(t.Context(), store)
35+
err := Add(t.Context(), s)
4036
require.NoError(t, err)
4137

4238
loaded, err := Load(t.Context())

0 commit comments

Comments
 (0)