Skip to content
This repository was archived by the owner on Apr 26, 2026. It is now read-only.
This repository was archived by the owner on Apr 26, 2026. It is now read-only.

Test: add unit tests for restoreUserDir #617

Description

@cicalese

Summary

Add unit tests for the restoreUserDir function in internal/devmode/devmode.go.

What to test

This function reverses consolidateUserDir — it removes the symlink and restores the user directory as a real directory with its original contents.

Test cases:

  • Symlink exists pointing to code dir — should remove symlink and restore directory
  • Real directory exists (not a symlink) — should handle gracefully
  • Directory does not exist — should be a no-op
  • Source directory in code dir has contents — should copy them back

How to test

Use t.TempDir() to create temporary directory structures. No Docker or orchestrator needed.

Context

Part of the test coverage initiative (#241).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions