Skip to content

Commit 7e2404d

Browse files
committed
fix: remove shell references from integration tests after snapshot refactor
Integration tests still referenced ShellSnapshot and SyncPlan shell fields that were removed in 69a3a74.
1 parent 69a3a74 commit 7e2404d

2 files changed

Lines changed: 3 additions & 30 deletions

File tree

test/integration/snapshot_integration_test.go

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ func TestIntegration_SnapshotSaveLoad(t *testing.T) {
4141
Desc: "Show path bar in Finder",
4242
},
4343
},
44-
Shell: snapshot.ShellSnapshot{
45-
Default: "/bin/zsh",
46-
OhMyZsh: true,
47-
Plugins: []string{"git", "docker"},
48-
Theme: "robbyrussell",
49-
},
5044
Git: snapshot.GitSnapshot{
5145
UserName: "Test User",
5246
UserEmail: "test@example.com",
@@ -80,7 +74,6 @@ func TestIntegration_SnapshotSaveLoad(t *testing.T) {
8074
assert.Equal(t, snap.Packages.Formulae, loaded.Packages.Formulae)
8175
assert.Equal(t, snap.Packages.Casks, loaded.Packages.Casks)
8276
assert.Equal(t, snap.Packages.Npm, loaded.Packages.Npm)
83-
assert.Equal(t, snap.Shell.OhMyZsh, loaded.Shell.OhMyZsh)
8477
assert.Equal(t, snap.Git.UserName, loaded.Git.UserName)
8578
assert.Equal(t, len(snap.DevTools), len(loaded.DevTools))
8679
assert.Equal(t, snap.MatchedPreset, loaded.MatchedPreset)
@@ -360,10 +353,6 @@ func TestIntegration_SnapshotUpload(t *testing.T) {
360353
Casks: []string{"docker"},
361354
Npm: []string{"typescript"},
362355
},
363-
Shell: snapshot.ShellSnapshot{
364-
Default: "/bin/zsh",
365-
OhMyZsh: true,
366-
},
367356
Git: snapshot.GitSnapshot{
368357
UserName: "Test User",
369358
UserEmail: "test@example.com",
@@ -453,10 +442,6 @@ func TestIntegration_SnapshotImport(t *testing.T) {
453442
Casks: []string{"vscode"},
454443
Npm: []string{"eslint"},
455444
},
456-
Shell: snapshot.ShellSnapshot{
457-
Default: "/bin/bash",
458-
OhMyZsh: false,
459-
},
460445
Git: snapshot.GitSnapshot{
461446
UserName: "Remote User",
462447
UserEmail: "remote@example.com",
@@ -584,12 +569,6 @@ func TestIntegration_SnapshotRoundTrip(t *testing.T) {
584569
{Domain: "com.apple.finder", Key: "ShowPathbar", Value: "1", Desc: "Show path bar"},
585570
{Domain: "com.apple.dock", Key: "autohide", Value: "1", Desc: "Auto-hide dock"},
586571
},
587-
Shell: snapshot.ShellSnapshot{
588-
Default: "/bin/zsh",
589-
OhMyZsh: true,
590-
Plugins: []string{"git", "docker", "kubectl"},
591-
Theme: "robbyrussell",
592-
},
593572
Git: snapshot.GitSnapshot{
594573
UserName: "Test Developer",
595574
UserEmail: "dev@example.com",
@@ -625,10 +604,6 @@ func TestIntegration_SnapshotRoundTrip(t *testing.T) {
625604
assert.Equal(t, original.Packages.Taps, loaded.Packages.Taps)
626605
assert.Equal(t, original.Packages.Npm, loaded.Packages.Npm)
627606
assert.Equal(t, len(original.MacOSPrefs), len(loaded.MacOSPrefs))
628-
assert.Equal(t, original.Shell.Default, loaded.Shell.Default)
629-
assert.Equal(t, original.Shell.OhMyZsh, loaded.Shell.OhMyZsh)
630-
assert.Equal(t, original.Shell.Plugins, loaded.Shell.Plugins)
631-
assert.Equal(t, original.Shell.Theme, loaded.Shell.Theme)
632607
assert.Equal(t, original.Git.UserName, loaded.Git.UserName)
633608
assert.Equal(t, original.Git.UserEmail, loaded.Git.UserEmail)
634609
assert.Equal(t, len(original.DevTools), len(loaded.DevTools))

test/integration/sync_integration_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ func TestIntegration_Execute_DryRun_FullPlan(t *testing.T) {
7777
InstallNpm: []string{"turbo"},
7878
InstallTaps: []string{"homebrew/cask-fonts"},
7979
UninstallFormulae: []string{"htop"},
80-
UpdateDotfiles: "https://github.com/user/dots",
81-
UpdateTheme: "agnoster",
82-
InstallPlugins: []string{"zsh-autosuggestions"},
80+
UpdateDotfiles: "https://github.com/user/dots",
8381
UpdateMacOSPrefs: []config.RemoteMacOSPref{
8482
{Domain: "com.apple.dock", Key: "autohide", Value: "true"},
8583
},
@@ -91,7 +89,7 @@ func TestIntegration_Execute_DryRun_FullPlan(t *testing.T) {
9189
assert.Equal(t, 4, result.Installed)
9290
// 1 formulae uninstalled
9391
assert.Equal(t, 1, result.Uninstalled)
94-
// dotfiles(1) + shell(1) + macos(1) = 3 updated
95-
assert.Equal(t, 3, result.Updated)
92+
// dotfiles(1) + macos(1) = 2 updated
93+
assert.Equal(t, 2, result.Updated)
9694
assert.Empty(t, result.Errors)
9795
}

0 commit comments

Comments
 (0)