Removes more Wild Cloud cruft.
This commit is contained in:
@@ -236,63 +236,6 @@ func TestSaveState_CreatesDirectory(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Test: State.IsEmpty checks if config is empty
|
||||
func TestState_IsEmpty(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
config *State
|
||||
want bool
|
||||
}{
|
||||
{
|
||||
name: "nil config is empty",
|
||||
config: nil,
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "default config is empty",
|
||||
config: &State{},
|
||||
want: true,
|
||||
},
|
||||
{
|
||||
name: "config with only central domain is not empty",
|
||||
config: func() *State {
|
||||
cfg := &State{}
|
||||
cfg.Cloud.Central.Domain = "central.example.com"
|
||||
return cfg
|
||||
}(),
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "config with only operator email is not empty",
|
||||
config: func() *State {
|
||||
cfg := &State{}
|
||||
cfg.Operator.Email = "admin@example.com"
|
||||
return cfg
|
||||
}(),
|
||||
want: false,
|
||||
},
|
||||
{
|
||||
name: "config with all fields is not empty",
|
||||
config: func() *State {
|
||||
cfg := &State{}
|
||||
cfg.Cloud.Central.Domain = "central.example.com"
|
||||
cfg.Operator.Email = "admin@example.com"
|
||||
return cfg
|
||||
}(),
|
||||
want: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got := tt.config.IsEmpty()
|
||||
if got != tt.want {
|
||||
t.Errorf("IsEmpty() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Test: Round-trip save and load preserves data
|
||||
func TestState_RoundTrip(t *testing.T) {
|
||||
tempDir := t.TempDir()
|
||||
|
||||
Reference in New Issue
Block a user