@@ -2,6 +2,7 @@ package controller
2
2
3
3
import (
4
4
"context"
5
+ "fmt"
5
6
"time"
6
7
7
8
agentsv1beta "github.com/lightrun-platform/lightrun-k8s-operator/api/v1beta"
@@ -34,7 +35,13 @@ var _ = Describe("LightrunJavaAgent controller", func() {
34
35
agentCliFlags = "--lightrun_extra_class_path=<PATH_TO_JAR>"
35
36
)
36
37
var containerSelector = []string {"app" , "app2" }
37
- var agentConfig map [string ]string = map [string ]string {"max_log_cpu_cost" : "2" }
38
+ var agentConfig map [string ]string = map [string ]string {
39
+ "max_log_cpu_cost" : "2" ,
40
+ "some_config" : "1" ,
41
+ "some_other_config" : "2" ,
42
+ "some_yet_another_config" : "1" ,
43
+
44
+ }
38
45
var agentTags []string = []string {"new_tag" , "prod" }
39
46
var secretData map [string ]string = map [string ]string {
40
47
"LIGHTRUN_KEY" : "some_key" ,
@@ -336,6 +343,11 @@ var _ = Describe("LightrunJavaAgent controller", func() {
336
343
return flag == 2
337
344
}).Should (BeTrue ())
338
345
})
346
+ It ("Should not change hash of the configmap in the deployment metadata" , func () {
347
+ Eventually (func () bool {
348
+ return patchedDepl .Spec .Template .Annotations ["lightrun.com/configmap-hash" ] == fmt .Sprint (hash (cm .Data ["config" ]+ cm .Data ["metadata" ]))
349
+ }).Should (BeTrue ())
350
+ })
339
351
340
352
It ("Should add finalizer to first CRD" , func () {
341
353
Eventually (func () bool {
0 commit comments