@@ -300,7 +300,7 @@ port=3000
300300EOF
301301
302302 # Install the directory
303- run_podman quadlet install " $app_dir "
303+ run_podman quadlet install " $app_dir " --application= $app_name
304304
305305 # Verify all quadlets were installed (2 individual + 3 from .quadlets file = 5 total)
306306 assert " $output " =~ " ${frontend_name} .container" " install output should contain ${frontend_name} .container"
@@ -313,23 +313,12 @@ EOF
313313 assert " ${# lines[@]} " -eq 6 " install output should contain exactly six lines"
314314
315315 # Verify all files exist on disk
316- [[ -f " $install_dir /${frontend_name} .container" ]] || die " ${frontend_name} .container should exist on disk"
317- [[ -f " $install_dir /${data_name} .volume" ]] || die " ${data_name} .volume should exist on disk"
318- [[ -f " $install_dir /${api_name} .container" ]] || die " ${api_name} .container should exist on disk"
319- [[ -f " $install_dir /${cache_name} .volume" ]] || die " ${cache_name} .volume should exist on disk"
320- [[ -f " $install_dir /${network_name} .network" ]] || die " ${network_name} .network should exist on disk"
321- [[ -f " $install_dir /app.conf" ]] || die " app.conf should exist on disk"
322-
323- # Check that the .app file was created (all files are part of one application)
324- [[ -f " $install_dir /.${app_name} .app" ]] || die " .${app_name} .app file should exist"
325-
326- # Verify the .app file contains all quadlet names
327- run cat " $install_dir /.${app_name} .app"
328- assert " $output " =~ " ${frontend_name} .container" " .app file should contain ${frontend_name} .container"
329- assert " $output " =~ " ${data_name} .volume" " .app file should contain ${data_name} .volume"
330- assert " $output " =~ " ${api_name} .container" " .app file should contain ${api_name} .container"
331- assert " $output " =~ " ${cache_name} .volume" " .app file should contain ${cache_name} .volume"
332- assert " $output " =~ " ${network_name} .network" " .app file should contain ${network_name} .network"
316+ [[ -f " $install_dir /$app_name /${frontend_name} .container" ]] || die " ${frontend_name} .container should exist on disk"
317+ [[ -f " $install_dir /$app_name /${data_name} .volume" ]] || die " ${data_name} .volume should exist on disk"
318+ [[ -f " $install_dir /$app_name /${api_name} .container" ]] || die " ${api_name} .container should exist on disk"
319+ [[ -f " $install_dir /$app_name /${cache_name} .volume" ]] || die " ${cache_name} .volume should exist on disk"
320+ [[ -f " $install_dir /$app_name /${network_name} .network" ]] || die " ${network_name} .network should exist on disk"
321+ [[ -f " $install_dir /$app_name /app.conf" ]] || die " app.conf should exist on disk"
333322
334323 # Test quadlet list to verify all quadlets show the same app name
335324 run_podman quadlet list
@@ -339,28 +328,21 @@ EOF
339328 local cache_line=$( echo " $output " | grep " ${cache_name} .volume" )
340329 local network_line=$( echo " $output " | grep " ${network_name} .network" )
341330
342- # All lines should contain the same app name (.${app_name}.app)
343- assert " $frontend_line " =~ " \\ .${app_name} \\ .app" " ${frontend_name} should show .${app_name} .app as app"
344- assert " $data_line " =~ " \\ .${app_name} \\ .app" " ${data_name} should show .${app_name} .app as app"
345- assert " $api_line " =~ " \\ .${app_name} \\ .app" " ${api_name} should show .${app_name} .app as app"
346- assert " $cache_line " =~ " \\ .${app_name} \\ .app" " ${cache_name} should show .${app_name} .app as app"
347- assert " $network_line " =~ " \\ .${app_name} \\ .app" " ${network_name} should show .${app_name} .app as app"
348-
349331 # Verify content of individual quadlet files
350- run cat " $install_dir /${frontend_name} .container"
332+ run cat " $install_dir /$app_name / $ {frontend_name} .container"
351333 assert " $output " =~ " \\ [Container\\ ]" " frontend container file should contain [Container] section"
352334 assert " $output " =~ " ContainerName=frontend-app-" " frontend container file should contain correct name prefix"
353335
354- run cat " $install_dir /${api_name} .container"
336+ run cat " $install_dir /$app_name / $ {api_name} .container"
355337 assert " $output " =~ " \\ [Container\\ ]" " api-server container file should contain [Container] section"
356338 assert " $output " =~ " ContainerName=api-server-" " api-server container file should contain correct name prefix"
357339
358- run cat " $install_dir /${network_name} .network"
340+ run cat " $install_dir /$app_name / $ {network_name} .network"
359341 assert " $output " =~ " \\ [Network\\ ]" " network file should contain [Network] section"
360342 assert " $output " =~ " Subnet=192.168.1.0/24" " network file should contain correct subnet"
361343
362344 # Test that removing one quadlet removes the entire application
363- run_podman quadlet rm ${frontend_name} .container
345+ run_podman quadlet rm $app_name --recursive
364346
365347 # All quadlets should be removed since they're part of the same app
366348 run_podman quadlet list
@@ -370,14 +352,11 @@ EOF
370352 assert " $output " ! ~ " ${cache_name} .volume" " ${cache_name} .volume should also be removed as part of same app"
371353 assert " $output " ! ~ " ${network_name} .network" " ${network_name} .network should also be removed as part of same app"
372354
373- # The .app file should also be removed
374- [[ ! -f " $install_dir /.${app_name} .app" ]] || die " .${app_name} .app file should be removed"
375-
376355 # All individual files should be removed
377- [[ ! -f " $install_dir /${frontend_name} .container" ]] || die " ${frontend_name} .container should be removed"
378- [[ ! -f " $install_dir /${data_name} .volume" ]] || die " ${data_name} .volume should be removed"
379- [[ ! -f " $install_dir /${api_name} .container" ]] || die " ${api_name} .container should be removed"
380- [[ ! -f " $install_dir /${cache_name} .volume" ]] || die " ${cache_name} .volume should be removed"
381- [[ ! -f " $install_dir /${network_name} .network" ]] || die " ${network_name} .network should be removed"
382- [[ ! -f " $install_dir /app.conf" ]] || die " app.conf should be removed"
356+ [[ ! -f " $install_dir /$app_name / $ {frontend_name} .container" ]] || die " ${frontend_name} .container should be removed"
357+ [[ ! -f " $install_dir /$app_name / $ {data_name} .volume" ]] || die " ${data_name} .volume should be removed"
358+ [[ ! -f " $install_dir /$app_name / $ {api_name} .container" ]] || die " ${api_name} .container should be removed"
359+ [[ ! -f " $install_dir /$app_name / $ {cache_name} .volume" ]] || die " ${cache_name} .volume should be removed"
360+ [[ ! -f " $install_dir /$app_name / $ {network_name} .network" ]] || die " ${network_name} .network should be removed"
361+ [[ ! -f " $install_dir /$app_name / app.conf" ]] || die " app.conf should be removed"
383362}
0 commit comments