|
7 | 7 | package v1_test |
8 | 8 |
|
9 | 9 | import ( |
| 10 | + "testing" |
| 11 | + |
10 | 12 | coh "github.com/oracle/coherence-operator/api/v1" |
11 | 13 | corev1 "k8s.io/api/core/v1" |
12 | | - "testing" |
13 | 14 | ) |
14 | 15 |
|
15 | 16 | func TestCreateStatefulSetWithEmptyJvmSpec(t *testing.T) { |
@@ -236,67 +237,6 @@ func TestCreateStatefulSetWithJvmSpecWithGarbageCollector(t *testing.T) { |
236 | 237 | assertStatefulSetCreation(t, deployment, stsExpected) |
237 | 238 | } |
238 | 239 |
|
239 | | -func TestCreateStatefulSetWithJvmSpecWithGarbageCollectorArgs(t *testing.T) { |
240 | | - |
241 | | - spec := coh.CoherenceResourceSpec{ |
242 | | - JVM: &coh.JVMSpec{ |
243 | | - Gc: &coh.JvmGarbageCollectorSpec{ |
244 | | - Args: []string{"-XX:GC-ArgOne", "-XX:GC-ArgTwo"}, |
245 | | - Logging: nil, |
246 | | - }, |
247 | | - }, |
248 | | - } |
249 | | - |
250 | | - // Create the test deployment |
251 | | - deployment := createTestDeployment(spec) |
252 | | - // Create expected StatefulSet |
253 | | - stsExpected := createMinimalExpectedStatefulSet(deployment) |
254 | | - addEnvVarsToAll(stsExpected, corev1.EnvVar{Name: "JVM_GC_ARGS", Value: "-XX:GC-ArgOne -XX:GC-ArgTwo"}) |
255 | | - |
256 | | - // assert that the StatefulSet is as expected |
257 | | - assertStatefulSetCreation(t, deployment, stsExpected) |
258 | | -} |
259 | | - |
260 | | -func TestCreateStatefulSetWithJvmSpecWithGarbageCollectorLoggingFalse(t *testing.T) { |
261 | | - |
262 | | - spec := coh.CoherenceResourceSpec{ |
263 | | - JVM: &coh.JVMSpec{ |
264 | | - Gc: &coh.JvmGarbageCollectorSpec{ |
265 | | - Logging: boolPtr(false), |
266 | | - }, |
267 | | - }, |
268 | | - } |
269 | | - |
270 | | - // Create the test deployment |
271 | | - deployment := createTestDeployment(spec) |
272 | | - // Create expected StatefulSet |
273 | | - stsExpected := createMinimalExpectedStatefulSet(deployment) |
274 | | - addEnvVarsToAll(stsExpected, corev1.EnvVar{Name: "JVM_GC_LOGGING", Value: "false"}) |
275 | | - |
276 | | - // assert that the StatefulSet is as expected |
277 | | - assertStatefulSetCreation(t, deployment, stsExpected) |
278 | | -} |
279 | | - |
280 | | -func TestCreateStatefulSetWithJvmSpecWithGarbageCollectorLoggingTrue(t *testing.T) { |
281 | | - |
282 | | - spec := coh.CoherenceResourceSpec{ |
283 | | - JVM: &coh.JVMSpec{ |
284 | | - Gc: &coh.JvmGarbageCollectorSpec{ |
285 | | - Logging: boolPtr(true), |
286 | | - }, |
287 | | - }, |
288 | | - } |
289 | | - |
290 | | - // Create the test deployment |
291 | | - deployment := createTestDeployment(spec) |
292 | | - // Create expected StatefulSet |
293 | | - stsExpected := createMinimalExpectedStatefulSet(deployment) |
294 | | - addEnvVarsToAll(stsExpected, corev1.EnvVar{Name: "JVM_GC_LOGGING", Value: "true"}) |
295 | | - |
296 | | - // assert that the StatefulSet is as expected |
297 | | - assertStatefulSetCreation(t, deployment, stsExpected) |
298 | | -} |
299 | | - |
300 | 240 | func TestCreateStatefulSetWithJvmSpecWithDiagnosticsVolume(t *testing.T) { |
301 | 241 |
|
302 | 242 | hostPath := &corev1.HostPathVolumeSource{Path: "/home/root/debug"} |
|
0 commit comments