test(random): add unit tests for random behavior
- Added unit tests to cover random string generation and error handling. - Introduced Random interface and random struct for better abstraction. - Updated server, session, and interaction packages to require Random interface for dependency injection.
This commit is contained in:
@@ -3,6 +3,7 @@ package interaction
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
"tunnel_pls/internal/random"
|
||||
"tunnel_pls/types"
|
||||
|
||||
"github.com/charmbracelet/bubbles/help"
|
||||
@@ -22,6 +23,7 @@ func (i commandItem) Title() string { return i.name }
|
||||
func (i commandItem) Description() string { return i.desc }
|
||||
|
||||
type model struct {
|
||||
randomizer random.Random
|
||||
domain string
|
||||
protocol string
|
||||
tunnelType types.TunnelType
|
||||
|
||||
Reference in New Issue
Block a user