@@ -477,7 +477,7 @@ func TestCreateOrApplyDeployments(t *testing.T) {
477477 switch o := obj .(type ) {
478478 case * appsv1.Deployment :
479479 // Create a deployment with bitwarden-tls-certs volume to test volume update
480- deployment := testDeployment (certControllerDeploymentAssetName )
480+ deployment := testDeployment (bitwardenDeploymentAssetName )
481481 deployment .Spec .Template .Spec .Volumes = []corev1.Volume {
482482 {
483483 Name : "bitwarden-tls-certs" ,
@@ -488,11 +488,6 @@ func TestCreateOrApplyDeployments(t *testing.T) {
488488 },
489489 },
490490 }
491- // Add a bitwarden-sdk-server container to test container image update
492- deployment .Spec .Template .Spec .Containers = append (deployment .Spec .Template .Spec .Containers , corev1.Container {
493- Name : "bitwarden-sdk-server" ,
494- Image : "initial-bitwarden-image:latest" ,
495- })
496491 deployment .DeepCopyInto (o )
497492 }
498493 return true , nil
@@ -550,11 +545,9 @@ func TestCreateOrApplyDeployments(t *testing.T) {
550545 for _ , container := range deployment .Spec .Template .Spec .Containers {
551546 if container .Name == "bitwarden-sdk-server" {
552547 foundContainer = true
553- if container .Image == "initial-bitwarden-image:latest" {
554- t .Error ("bitwarden-sdk-server container image should have been updated from initial value" )
548+ if container .Image != commontest . TestBitwardenImageName {
549+ t .Errorf ("bitwarden-sdk-server container image should be %s, got: %s" , commontest . TestBitwardenImageName , container . Image )
555550 }
556- // The reconciler should update this to the value from environment variable
557- // We set RELATED_IMAGE_BITWARDEN_SDK_SERVER in the test
558551 break
559552 }
560553 }
0 commit comments