testRandomObjects returns a slice of randomly generated objects. If it is called with an object count of 0, a random number of slices (with an upper bound of 100) will be generated.
(num int)
| 206 | // testRandomObjects returns a slice of randomly generated objects. If it is called with an object |
| 207 | // count of 0, a random number of slices (with an upper bound of 100) will be generated. |
| 208 | func testRandomObjects(num int) (objects []deploy.KubeObject) { |
| 209 | if num == 0 { |
| 210 | num = rand.Intn(100) |
| 211 | } |
| 212 | |
| 213 | for i := 0; i < num; i++ { |
| 214 | // TODO: create different types of objects |
| 215 | name := "" |
| 216 | for { |
| 217 | name = randomString(10) |
| 218 | if !TestUsedNames[name] { |
| 219 | break |
| 220 | } |
| 221 | } |
| 222 | TestUsedNames[name] = true |
| 223 | objects = append(objects, createSecret(name)) |
| 224 | } |
| 225 | return |
| 226 | } |
| 227 | |
| 228 | func testDeploymentEqual(t *testing.T, expected, actual *deploy.Deployment) bool { |
| 229 | equal := expected.Equal(actual) |
no test coverage detected