-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41466 from andir/haproxy-1.8.9
Haproxy 1.8.9
- Loading branch information
Showing
3 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import ./make-test.nix ({ pkgs, ...}: { | ||
name = "haproxy"; | ||
nodes = { | ||
machine = { config, ...}: { | ||
imports = [ ../modules/profiles/minimal.nix ]; | ||
services.haproxy = { | ||
enable = true; | ||
config = '' | ||
defaults | ||
timeout connect 10s | ||
backend http_server | ||
mode http | ||
server httpd [::1]:8000 | ||
frontend http | ||
bind *:80 | ||
mode http | ||
use_backend http_server | ||
''; | ||
}; | ||
services.httpd = { | ||
enable = true; | ||
documentRoot = pkgs.writeTextDir "index.txt" "We are all good!"; | ||
adminAddr = "notme@yourhost.local"; | ||
listen = [{ | ||
ip = "::1"; | ||
port = 8000; | ||
}]; | ||
}; | ||
}; | ||
}; | ||
testScript = '' | ||
startAll; | ||
$machine->waitForUnit('multi-user.target'); | ||
$machine->waitForUnit('haproxy.service'); | ||
$machine->waitForUnit('httpd.service'); | ||
$machine->succeed('curl -k http://localhost:80/index.txt | grep "We are all good!"'); | ||
''; | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters