@@ -529,67 +529,67 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
529529 }
530530 expectedSpiloWalPathCompat := []ExpectedValue {
531531 {
532- envIndex : 12 ,
532+ envIndex : 15 ,
533533 envVarConstant : "ENABLE_WAL_PATH_COMPAT" ,
534534 envVarValue : "true" ,
535535 },
536536 }
537537 expectedValuesS3Bucket := []ExpectedValue {
538538 {
539- envIndex : 15 ,
539+ envIndex : 18 ,
540540 envVarConstant : "WAL_S3_BUCKET" ,
541541 envVarValue : "global-s3-bucket" ,
542542 },
543543 {
544- envIndex : 16 ,
544+ envIndex : 19 ,
545545 envVarConstant : "WAL_BUCKET_SCOPE_SUFFIX" ,
546546 envVarValue : fmt .Sprintf ("/%s" , dummyUUID ),
547547 },
548548 {
549- envIndex : 17 ,
549+ envIndex : 20 ,
550550 envVarConstant : "WAL_BUCKET_SCOPE_PREFIX" ,
551551 envVarValue : "" ,
552552 },
553553 }
554554 expectedValuesGCPCreds := []ExpectedValue {
555555 {
556- envIndex : 15 ,
556+ envIndex : 18 ,
557557 envVarConstant : "WAL_GS_BUCKET" ,
558558 envVarValue : "global-gs-bucket" ,
559559 },
560560 {
561- envIndex : 16 ,
561+ envIndex : 19 ,
562562 envVarConstant : "WAL_BUCKET_SCOPE_SUFFIX" ,
563563 envVarValue : fmt .Sprintf ("/%s" , dummyUUID ),
564564 },
565565 {
566- envIndex : 17 ,
566+ envIndex : 20 ,
567567 envVarConstant : "WAL_BUCKET_SCOPE_PREFIX" ,
568568 envVarValue : "" ,
569569 },
570570 {
571- envIndex : 18 ,
571+ envIndex : 21 ,
572572 envVarConstant : "GOOGLE_APPLICATION_CREDENTIALS" ,
573573 envVarValue : "some-path-to-credentials" ,
574574 },
575575 }
576576 expectedS3BucketConfigMap := []ExpectedValue {
577577 {
578- envIndex : 17 ,
578+ envIndex : 20 ,
579579 envVarConstant : "wal_s3_bucket" ,
580580 envVarValue : "global-s3-bucket-configmap" ,
581581 },
582582 }
583583 expectedCustomS3BucketSpec := []ExpectedValue {
584584 {
585- envIndex : 15 ,
585+ envIndex : 18 ,
586586 envVarConstant : "WAL_S3_BUCKET" ,
587587 envVarValue : "custom-s3-bucket" ,
588588 },
589589 }
590590 expectedCustomVariableSecret := []ExpectedValue {
591591 {
592- envIndex : 16 ,
592+ envIndex : 19 ,
593593 envVarConstant : "custom_variable" ,
594594 envVarValueRef : & v1.EnvVarSource {
595595 SecretKeyRef : & v1.SecretKeySelector {
@@ -603,72 +603,72 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
603603 }
604604 expectedCustomVariableConfigMap := []ExpectedValue {
605605 {
606- envIndex : 16 ,
606+ envIndex : 19 ,
607607 envVarConstant : "custom_variable" ,
608608 envVarValue : "configmap-test" ,
609609 },
610610 }
611611 expectedCustomVariableSpec := []ExpectedValue {
612612 {
613- envIndex : 15 ,
613+ envIndex : 18 ,
614614 envVarConstant : "CUSTOM_VARIABLE" ,
615615 envVarValue : "spec-env-test" ,
616616 },
617617 }
618618 expectedCloneEnvSpec := []ExpectedValue {
619619 {
620- envIndex : 16 ,
620+ envIndex : 19 ,
621621 envVarConstant : "CLONE_WALE_S3_PREFIX" ,
622622 envVarValue : "s3://another-bucket" ,
623623 },
624624 {
625- envIndex : 19 ,
625+ envIndex : 22 ,
626626 envVarConstant : "CLONE_WAL_BUCKET_SCOPE_PREFIX" ,
627627 envVarValue : "" ,
628628 },
629629 {
630- envIndex : 20 ,
630+ envIndex : 23 ,
631631 envVarConstant : "CLONE_AWS_ENDPOINT" ,
632632 envVarValue : "s3.eu-central-1.amazonaws.com" ,
633633 },
634634 }
635635 expectedCloneEnvSpecEnv := []ExpectedValue {
636636 {
637- envIndex : 15 ,
637+ envIndex : 18 ,
638638 envVarConstant : "CLONE_WAL_BUCKET_SCOPE_PREFIX" ,
639639 envVarValue : "test-cluster" ,
640640 },
641641 {
642- envIndex : 17 ,
642+ envIndex : 20 ,
643643 envVarConstant : "CLONE_WALE_S3_PREFIX" ,
644644 envVarValue : "s3://another-bucket" ,
645645 },
646646 {
647- envIndex : 21 ,
647+ envIndex : 24 ,
648648 envVarConstant : "CLONE_AWS_ENDPOINT" ,
649649 envVarValue : "s3.eu-central-1.amazonaws.com" ,
650650 },
651651 }
652652 expectedCloneEnvConfigMap := []ExpectedValue {
653653 {
654- envIndex : 16 ,
654+ envIndex : 19 ,
655655 envVarConstant : "CLONE_WAL_S3_BUCKET" ,
656656 envVarValue : "global-s3-bucket" ,
657657 },
658658 {
659- envIndex : 17 ,
659+ envIndex : 20 ,
660660 envVarConstant : "CLONE_WAL_BUCKET_SCOPE_SUFFIX" ,
661661 envVarValue : fmt .Sprintf ("/%s" , dummyUUID ),
662662 },
663663 {
664- envIndex : 21 ,
664+ envIndex : 24 ,
665665 envVarConstant : "clone_aws_endpoint" ,
666666 envVarValue : "s3.eu-west-1.amazonaws.com" ,
667667 },
668668 }
669669 expectedCloneEnvSecret := []ExpectedValue {
670670 {
671- envIndex : 21 ,
671+ envIndex : 24 ,
672672 envVarConstant : "clone_aws_access_key_id" ,
673673 envVarValueRef : & v1.EnvVarSource {
674674 SecretKeyRef : & v1.SecretKeySelector {
@@ -682,12 +682,12 @@ func TestGenerateSpiloPodEnvVars(t *testing.T) {
682682 }
683683 expectedStandbyEnvSecret := []ExpectedValue {
684684 {
685- envIndex : 15 ,
685+ envIndex : 18 ,
686686 envVarConstant : "STANDBY_WALE_GS_PREFIX" ,
687687 envVarValue : "gs://some/path/" ,
688688 },
689689 {
690- envIndex : 20 ,
690+ envIndex : 23 ,
691691 envVarConstant : "standby_google_application_credentials" ,
692692 envVarValueRef : & v1.EnvVarSource {
693693 SecretKeyRef : & v1.SecretKeySelector {
0 commit comments