summaryrefslogtreecommitdiff
path: root/internal/cli/profile_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/profile_test.go')
-rw-r--r--internal/cli/profile_test.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/internal/cli/profile_test.go b/internal/cli/profile_test.go
index d256cb0..17a5bc6 100644
--- a/internal/cli/profile_test.go
+++ b/internal/cli/profile_test.go
@@ -96,10 +96,6 @@ func TestProfileDeleteNotFound(t *testing.T) {
}
func TestProfileConfigure(t *testing.T) {
- // profile configure is intended to modify existing configs.
- // For now, we just want to ensure it doesn't crash and we can
- // eventually implement it.
-
tmpDir := t.TempDir()
profilesDir := filepath.Join(tmpDir, "profiles")
err := os.MkdirAll(profilesDir, 0755)
@@ -117,9 +113,11 @@ func TestProfileConfigure(t *testing.T) {
app := NewApp([]string{"wg-wrap", "profile", "configure", profileName})
app.ConfigDir = profilesDir
+ // Use "true" as the mock editor to ensure it exits successfully immediately
+ t.Setenv("EDITOR", "true")
+
err = app.Route()
- // This will currently return "not yet implemented" error, which is expected for now.
- if err == nil {
- t.Errorf("expected 'not yet implemented' error, got nil")
+ if err != nil {
+ t.Errorf("expected successful configuration, got error: %v", err)
}
}