MCPcopy
hub / github.com/cloudfoundry/cli / EnsureMinimumNumberOfStacks

Function EnsureMinimumNumberOfStacks

integration/helpers/stack.go:109–115  ·  view source on GitHub ↗

EnsureMinimumNumberOfStacks ensures there are at least stacks in the foundation by creating new ones if there are fewer than the specified number

(num int)

Source from the content-addressed store, hash-verified

107// EnsureMinimumNumberOfStacks ensures there are at least <num> stacks in the foundation by creating new ones if there
108// are fewer than the specified number
109func EnsureMinimumNumberOfStacks(num int) []string {
110 var stacks []string
111 for stacks = FetchStacks(); len(stacks) < num; {
112 stacks = append(stacks, CreateStack())
113 }
114 return stacks
115}

Calls 2

FetchStacksFunction · 0.85
CreateStackFunction · 0.85

Tested by

no test coverage detected