| 
									
										
										
										
											2016-09-26 18:06:56 -04:00
										 |  |  | import ./make-test.nix ({ pkgs, ... }: | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  |   name = "wordpress"; | 
					
						
							|  |  |  |   meta = with pkgs.stdenv.lib.maintainers; { | 
					
						
							|  |  |  |     maintainers = [ grahamc ]; # under duress! | 
					
						
							|  |  |  |   }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   nodes = | 
					
						
							|  |  |  |     { web = | 
					
						
							| 
									
										
										
										
											2018-07-20 20:56:59 +00:00
										 |  |  |         { pkgs, ... }: | 
					
						
							| 
									
										
										
										
											2016-09-26 18:06:56 -04:00
										 |  |  |         { | 
					
						
							| 
									
										
										
										
											2017-03-14 16:11:51 +01:00
										 |  |  |           services.mysql = { | 
					
						
							|  |  |  |             enable = true; | 
					
						
							|  |  |  |             package = pkgs.mysql; | 
					
						
							|  |  |  |           }; | 
					
						
							| 
									
										
										
										
											2016-09-26 18:06:56 -04:00
										 |  |  |           services.httpd = { | 
					
						
							|  |  |  |             enable = true; | 
					
						
							|  |  |  |             logPerVirtualHost = true; | 
					
						
							|  |  |  |             adminAddr="js@lastlog.de"; | 
					
						
							|  |  |  |             extraModules = [ | 
					
						
							|  |  |  |               { name = "php7"; path = "${pkgs.php}/modules/libphp7.so"; } | 
					
						
							|  |  |  |             ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |             virtualHosts = [ | 
					
						
							|  |  |  |               { | 
					
						
							|  |  |  |                 hostName = "wordpress"; | 
					
						
							|  |  |  |                 extraSubservices = | 
					
						
							|  |  |  |                   [ | 
					
						
							|  |  |  |                     { | 
					
						
							|  |  |  |                       serviceType = "wordpress"; | 
					
						
							|  |  |  |                       dbPassword = "wordpress"; | 
					
						
							|  |  |  |                       wordpressUploads = "/data/uploads"; | 
					
						
							|  |  |  |                       languages = [ "de_DE" "en_GB" ]; | 
					
						
							|  |  |  |                     } | 
					
						
							|  |  |  |                   ]; | 
					
						
							|  |  |  |               } | 
					
						
							|  |  |  |             ]; | 
					
						
							|  |  |  |           }; | 
					
						
							|  |  |  |         }; | 
					
						
							|  |  |  |     }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   testScript = | 
					
						
							| 
									
										
										
										
											2018-07-20 20:56:59 +00:00
										 |  |  |     { ... }: | 
					
						
							| 
									
										
										
										
											2016-09-26 18:06:56 -04:00
										 |  |  |     ''
 | 
					
						
							|  |  |  |       startAll; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $web->waitForUnit("mysql"); | 
					
						
							|  |  |  |       $web->waitForUnit("httpd"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       $web->succeed("curl -L 127.0.0.1:80 | grep 'Welcome to the famous'"); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     '';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | }) |