@@ -98,6 +98,9 @@ describe("Traefik bootstrap certificate template", () => {
9898 expect ( tasks ) . toContain ( "lxc exec {{ terrarium_zitadel_instance_name }} -- bash -lc" ) ;
9999 expect ( tasks ) . toContain ( "Migrate legacy host ZITADEL data into system instance when present" ) ;
100100 expect ( tasks ) . toContain ( "Ensure host loopback proxies reach the ZITADEL system instance" ) ;
101+ expect ( tasks ) . toContain ( "systemctl enable terrarium-zitadel.service" ) ;
102+ expect ( tasks ) . toContain ( "Start or restart ZITADEL compose service inside system instance" ) ;
103+ expect ( tasks ) . not . toContain ( "systemctl enable --now terrarium-zitadel.service" ) ;
101104 expect ( tasks ) . not . toContain ( "- name: Install ZITADEL runtime packages" ) ;
102105 } ) ;
103106
@@ -119,10 +122,15 @@ describe("Traefik bootstrap certificate template", () => {
119122 const playbook = readFileSync ( join ( repoRoot , "ansible/site.yml" ) , "utf8" ) ;
120123
121124 expect ( defaults ) . toContain ( "terrarium_zitadel_postgres_image: \"\"" ) ;
125+ expect ( defaults ) . toContain ( "terrarium_zitadel_postgres_uid: 70" ) ;
126+ expect ( defaults ) . toContain ( "terrarium_zitadel_postgres_gid: 70" ) ;
122127 expect ( defaults ) . toContain ( `terrarium_zitadel_postgres_image_hardened: "${ POSTGRES_DHI_IMAGE } "` ) ;
123128 expect ( defaults ) . toContain ( `terrarium_zitadel_postgres_image_mirror: "${ POSTGRES_MIRROR_IMAGE } "` ) ;
124129 expect ( defaults ) . toContain ( `terrarium_zitadel_postgres_image_fallback: "${ POSTGRES_FALLBACK_IMAGE } "` ) ;
125130 expect ( tasks ) . toContain ( "Resolve ZITADEL Postgres image" ) ;
131+ expect ( tasks ) . toContain ( "Create ZITADEL Postgres data directory inside system instance" ) ;
132+ expect ( tasks ) . toContain ( "-o {{ terrarium_zitadel_postgres_uid }}" ) ;
133+ expect ( tasks ) . toContain ( "-g {{ terrarium_zitadel_postgres_gid }}" ) ;
126134 expect ( tasks ) . toContain ( "terrarium_zitadel_postgres_image_mirror" ) ;
127135 expect ( tasks . indexOf ( "terrarium_zitadel_postgres_image_hardened" ) ) . toBeLessThan (
128136 tasks . indexOf ( "terrarium_zitadel_postgres_image_mirror" )
@@ -131,6 +139,7 @@ describe("Traefik bootstrap certificate template", () => {
131139 tasks . indexOf ( "terrarium_zitadel_postgres_image_fallback" )
132140 ) ;
133141 expect ( compose ) . toContain ( "image: {{ terrarium_zitadel_postgres_image_effective }}" ) ;
142+ expect ( compose ) . toContain ( "PGDATA: /var/lib/postgresql/data" ) ;
134143 expect ( playbook ) . toContain ( "Check Docker registry credentials for hardened images" ) ;
135144 expect ( playbook ) . toContain ( "'terrarium_zitadel_postgres_image': terrarium_zitadel_postgres_image_effective" ) ;
136145 expect ( defaults ) . not . toContain ( "postgres:17.2-alpine" ) ;
0 commit comments