nixosTests.homepage-dashboard: remove unmanaged conf tests
This commit is contained in:
		
							parent
							
								
									eb324777e9
								
							
						
					
					
						commit
						4240d073c7
					
				| @ -4,15 +4,7 @@ import ./make-test-python.nix ( | |||||||
|     name = "homepage-dashboard"; |     name = "homepage-dashboard"; | ||||||
|     meta.maintainers = with lib.maintainers; [ jnsgruk ]; |     meta.maintainers = with lib.maintainers; [ jnsgruk ]; | ||||||
| 
 | 
 | ||||||
|     nodes.unmanaged_conf = |     nodes.machine = _: { | ||||||
|       { pkgs, ... }: |  | ||||||
|       { |  | ||||||
|         services.homepage-dashboard.enable = true; |  | ||||||
|       }; |  | ||||||
| 
 |  | ||||||
|     nodes.managed_conf = |  | ||||||
|       { pkgs, ... }: |  | ||||||
|       { |  | ||||||
|       services.homepage-dashboard = { |       services.homepage-dashboard = { | ||||||
|         enable = true; |         enable = true; | ||||||
|         settings.title = "test title rodUsEagid"; # something random/unique |         settings.title = "test title rodUsEagid"; # something random/unique | ||||||
| @ -20,30 +12,17 @@ import ./make-test-python.nix ( | |||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     testScript = '' |     testScript = '' | ||||||
|       # Ensure the services are started on unmanaged machine |  | ||||||
|       unmanaged_conf.wait_for_unit("homepage-dashboard.service") |  | ||||||
|       unmanaged_conf.wait_for_open_port(8082) |  | ||||||
|       unmanaged_conf.succeed("curl --fail http://localhost:8082/") |  | ||||||
| 
 |  | ||||||
|       # Ensure that /etc/homepage-dashboard doesn't exist, and boilerplate |  | ||||||
|       # configs are copied into place. |  | ||||||
|       unmanaged_conf.fail("test -d /etc/homepage-dashboard") |  | ||||||
|       unmanaged_conf.succeed("test -f /var/lib/private/homepage-dashboard/settings.yaml") |  | ||||||
| 
 |  | ||||||
|       # Ensure the services are started on managed machine |       # Ensure the services are started on managed machine | ||||||
|       managed_conf.wait_for_unit("homepage-dashboard.service") |       machine.wait_for_unit("homepage-dashboard.service") | ||||||
|       managed_conf.wait_for_open_port(8082) |       machine.wait_for_open_port(8082) | ||||||
|       managed_conf.succeed("curl --fail http://localhost:8082/") |       machine.succeed("curl --fail http://localhost:8082/") | ||||||
| 
 | 
 | ||||||
|       # Ensure /etc/homepage-dashboard is created and unmanaged conf location isn't. |       # Ensure /etc/homepage-dashboard is created. | ||||||
|       managed_conf.succeed("test -d /etc/homepage-dashboard") |       machine.succeed("test -d /etc/homepage-dashboard") | ||||||
|       managed_conf.fail("test -f /var/lib/private/homepage-dashboard/settings.yaml") |  | ||||||
| 
 | 
 | ||||||
|       # Ensure that we see the custom title *only in the managed config* |       # Ensure that we see the custom title *only in the managed config* | ||||||
|       page = managed_conf.succeed("curl --fail http://localhost:8082/") |       page = machine.succeed("curl --fail http://localhost:8082/") | ||||||
|       assert "test title rodUsEagid" in page, "Custom title not found" |       assert "test title rodUsEagid" in page, "Custom title not found" | ||||||
|       page = unmanaged_conf.succeed("curl --fail http://localhost:8082/") |  | ||||||
|       assert "test title rodUsEagid" not in page, "Custom title found where it shouldn't be" |  | ||||||
|     ''; |     ''; | ||||||
|   } |   } | ||||||
| ) | ) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jon Seager
						Jon Seager