Skip to content

Commit c7497d4

Browse files
author
Allison Pierson
committed
remove DefaultMachineGuest(), made redundant after a rebase
1 parent 0724334 commit c7497d4

File tree

2 files changed

+0
-19
lines changed

2 files changed

+0
-19
lines changed

api/machine_types.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,6 @@ var MachinePresets map[string]*MachineGuest = map[string]*MachineGuest{
407407
"performance-16x": {CPUKind: "performance", CPUs: 16, MemoryMB: 16 * MIN_MEMORY_MB_PER_CPU},
408408
}
409409

410-
func DefaultMachineGuest() *MachineGuest {
411-
// This assumes that MachineGuest does not contain any pointers.
412-
g := *MachinePresets[DefaultVMSize]
413-
return &g
414-
}
415-
416410
type MachineMetrics struct {
417411
Port int `toml:"port" json:"port,omitempty"`
418412
Path string `toml:"path" json:"path,omitempty"`

api/machine_types_test.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,19 +159,6 @@ func TestMachineGuest_ToSize(t *testing.T) {
159159
}
160160
}
161161

162-
func TestMachineGuest_DefaultCopied(t *testing.T) {
163-
164-
m1 := DefaultMachineGuest()
165-
m2 := DefaultMachineGuest()
166-
167-
m1.CPUs = 100
168-
m2.CPUs = 200
169-
170-
if m1.CPUs == m2.CPUs {
171-
t.Errorf("DefaultMachineGuest is not copying the guest, it's returning a direct pointer to the default.")
172-
}
173-
}
174-
175162
func TestMachineMostRecentStartTimeAfterLaunch(t *testing.T) {
176163
type testcase struct {
177164
name string

0 commit comments

Comments
 (0)