container-test-run-github-webhook
checks.x86_64-linux.nixosTests.github-webhook.x86_64-linux
· build #177
· raw
1[0.00s] Machine state will be reset. To keep it, pass --keep-machine-state2[0.00s] start all VLans3[0.01s] (finished: start all VLans, in 0.00 seconds)4Initializing machine ID from random generator.5[0.05s] Test will time out and terminate in 120.0 seconds6[0.05s] run the VM test script7additionally exposed symbols:8 machine,9 vlan1,10 start_all, test_script, machines, machines_qemu, machines_nspawn, vlans, driver, log, os, create_machine, subtest, run_tests, join_all, retry, serial_stdout_off, serial_stdout_on, polling_condition, BaseMachine, QemuMachine, NspawnMachine, t, debug, dump_machine_ssh11[0.05s] machine: systemd-nspawn running (pid 50)12[0.06s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13[0.06s] machine: waiting for unit multi-user.target14nixos-nspawn(machine): TAP vde-tap1 not found; container will be isolated from VDE15nixos-nspawn(machine): A common reason for this is that /dev/net is not available in the Nix sandbox. Try adding /dev/net to extra-sandbox-paths.16Note: in a future version of systemd-nspawn the default set of permitted socket address families will be restricted to AF_INET, AF_INET6 and AF_UNIX. Use --restrict-address-families= to configure the set of permitted socket address families, or set RestrictAddressFamilies= in a .nspawn file.17░ Spawning container machine on /build/vm-state-machine.18machine # No journal files were found.19machine # No journal boot entry found for the specified boot (+0).20machine # [ 2592.556838] machine systemd-journald[68]: Journal started21machine # [ 2592.556921] machine systemd-journald[68]: Runtime Journal (/run/log/journal/7a6f84c765124534ab1b1b71adc59f76) is 8M, max 1.2G, 1.2G free.22machine # [ 2592.573922] machine systemd[1]: Finished Apply Kernel Variables.23machine # [ 2592.591090] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.24machine # [ 2592.609284] machine systemd[1]: Starting Flush Journal to Persistent Storage...25machine # [ 2592.609897] machine systemd[1]: Starting Create Static Device Nodes in /dev...26machine # [ 2592.622402] machine systemd-journald[68]: Time spent on flushing to /var/log/journal/7a6f84c765124534ab1b1b71adc59f76 is 1.840ms for 6 entries.27machine # [ 2592.622402] machine systemd-journald[68]: System Journal (/var/log/journal/7a6f84c765124534ab1b1b71adc59f76) is 8M, max 4G, 3.9G free.28machine # [ 2592.638075] machine systemd[1]: Finished Create Static Device Nodes in /dev.29machine # [ 2592.638683] machine systemd[1]: Reached target Preparation for Local File Systems.30machine # [ 2592.638832] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys31machine # [ 2592.640502] machine systemd[1]: Finished Flush Journal to Persistent Storage.32machine # [ 2592.658523] machine systemd[1]: Finished Firewall.33machine # [ 2593.559847] machine systemd[1]: Mounting /run/wrappers...34machine # [ 2593.595634] machine systemd[1]: Mounted /run/wrappers.35machine # [ 2593.596228] machine systemd[1]: Reached target Local File Systems.36machine # [ 2593.597193] machine systemd[1]: Listening on Boot Loader Control Service Socket.37machine # [ 2593.598007] machine systemd[1]: Starting Create SUID/SGID Wrappers...38machine # [ 2593.598061] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container39machine # [ 2593.598934] machine systemd[1]: Starting Save Transient machine-id to Disk...40machine # [ 2593.599991] machine systemd[1]: Starting Create System Files and Directories...41machine # [ 2593.633113] machine systemd-tmpfiles[174]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted42machine # [ 2593.633359] machine systemd-tmpfiles[174]: fchmod() of /var/log/journal failed: Operation not permitted43machine # [ 2593.633530] machine systemd-tmpfiles[174]: fchmod() of /var/log/journal/7a6f84c765124534ab1b1b71adc59f76 failed: Operation not permitted44machine # [ 2593.633768] machine systemd-tmpfiles[174]: fchmod() of /run/log/journal failed: Operation not permitted45machine # [ 2593.635614] machine suid-sgid-wrappers-start[181]: chmod: changing permissions of '/run/wrappers/wrappers.Wo5x5Btv6y/chsh': Operation not permitted46machine # [ 2593.641288] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE47machine # [ 2593.641358] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available48machine # [ 2593.641434] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available49machine # [ 2593.641474] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.50machine # [ 2593.641659] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.51machine # [ 2593.642604] machine systemd[1]: Finished Create System Files and Directories.52machine # [ 2593.661957] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.53machine # [ 2593.690724] machine systemd[1]: Finished Save Transient machine-id to Disk.54machine # [ 2593.693394] machine systemd[1]: Starting Rebuild Journal Catalog...55machine # [ 2593.694319] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...56machine # [ 2593.713446] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.57machine # [ 2593.728362] machine systemd[1]: Finished Rebuild Journal Catalog.58machine # [ 2593.729362] machine systemd[1]: Starting Update is Completed...59machine # [ 2593.743877] machine systemd[1]: Finished Update is Completed.60machine # [ 2593.744323] machine systemd[1]: Reached target System Initialization.61machine # [ 2593.744445] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container62machine # [ 2593.744495] machine systemd[1]: Started Daily Cleanup of Temporary Directories.63machine # [ 2593.744528] machine systemd[1]: Reached target Timer Units.64machine # [ 2593.744655] machine systemd[1]: Listening on D-Bus System Message Bus Socket.65machine # [ 2593.744762] machine systemd[1]: Listening on Nix Daemon Socket.66machine # [ 2593.745862] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).67machine # [ 2593.747161] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).68machine # [ 2593.747959] machine systemd[1]: Listening on SSH Socket.69machine # [ 2593.748076] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.70machine # [ 2593.748101] machine systemd[1]: Reached target Socket Units.71machine # [ 2593.748143] machine systemd[1]: Reached target Basic System.72machine # [ 2593.749037] machine systemd[1]: Starting Import lastlog data into lastlog2 database...73machine # [ 2593.749842] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...74machine # [ 2593.750942] machine systemd[1]: Starting resolvconf update...75machine # [ 2593.750967] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.76machine # [ 2593.770130] machine systemd[1]: Finished Import lastlog data into lastlog2 database.77machine # [ 2593.810199] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available78machine # [ 2593.810244] machine systemd[1]: nscd.service: Deactivated successfully.79machine # [ 2593.810415] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).80machine # [ 2593.812448] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...81machine # [ 2593.820996] machine resolvconf-start[248]: setfacl: /run/resolvconf: Operation not supported82machine # [ 2593.822125] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE83machine # [ 2593.822198] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available84machine # [ 2593.822281] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available85machine # [ 2593.822318] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.86machine # [ 2593.822834] machine systemd[1]: Failed to start resolvconf update.87machine # [ 2593.823138] machine systemd[1]: Reached target Preparation for Network.88machine # [ 2593.824154] machine systemd[1]: Starting Address configuration of eth1...89machine # [ 2593.825222] machine systemd[1]: Starting Extra networking commands....90machine # [ 2593.840531] machine network-addresses-eth1-start[251]: adding address 192.168.1.1/24... done91machine # [ 2593.843190] machine network-addresses-eth1-start[251]: adding address 2001:db8:1::1/64... done92machine # [ 2593.846727] machine systemd[1]: Finished Address configuration of eth1.93machine # [ 2593.878044] machine systemd[1]: Finished Extra networking commands..94machine # [ 2593.878478] machine systemd[1]: Reached target Network.95machine # [ 2593.878555] machine systemd[1]: Reached target Network is Online.96machine # [ 2593.879416] machine systemd[1]: Starting GitHub webhook listener...97machine # [ 2593.976095] machine nsncd[239]: Nov 15 08:11:55.905 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"98machine # [ 2593.976188] machine systemd[1]: Started Name Service Cache Daemon (nsncd).99machine # [ 2593.976242] machine systemd[1]: Reached target Host and Network Name Lookups.100machine # [ 2593.976294] machine systemd[1]: Reached target User and Group Name Lookups.101machine # [ 2593.977973] machine systemd[1]: Starting User Login Management...102machine # [ 2593.978664] machine systemd[1]: Starting Permit User Sessions...103machine # [ 2593.996501] machine systemd[1]: Finished Permit User Sessions.104machine # [ 2593.997354] machine systemd[1]: Started Console Getty.105machine # [ 2593.997397] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0106machine # [ 2593.997420] machine systemd[1]: Reached target Login Prompts.107machine # [ 2595.214784] machine systemd[1]: Started GitHub webhook listener.108machine # [ 2595.220669] machine github-webhook[309]: [test/repo1] running startup command109machine # [ 2595.228774] machine github-webhook[309]: [test/repo1] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result110machine # [ 2595.228774] machine github-webhook[309]: listening on :8673111machine # [ 2595.279906] machine systemd[1]: Starting D-Bus System Message Bus...112machine # [ 2595.281024] machine systemd-logind[321]: New seat seat0.113machine # [ 2595.281862] machine systemd[1]: Started User Login Management.114machine # [ 2595.283281] machine systemd[1]: Starting linger-users.service...115machine # [ 2595.311984] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available116machine # [ 2595.312063] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available117machine # [ 2595.312101] machine systemd[1]: linger-users.service: Deactivated successfully.118machine # [ 2595.312280] machine systemd[1]: Finished linger-users.service.119machine # [ 2595.312502] machine systemd[1]: Reached target Multi-User System.120[4.72s] machine: (finished: waiting for unit multi-user.target, in 4.66 seconds)121[4.72s] machine: waiting for unit github-webhook.service122[4.74s] machine: (finished: waiting for unit github-webhook.service, in 0.02 seconds)123[4.74s] machine: waiting for TCP port 8673 on localhost124Connection to localhost (::1) 8673 port [tcp/*] succeeded!125[4.76s] machine: (finished: waiting for TCP port 8673 on localhost, in 0.03 seconds)126Test 1: Health check...127[4.76s] machine: must succeed: curl -f http://localhost:8673/healthz128 % Total % Received % Xferd Average Speed Time Time Time Current129 Dload Upload Total Spent Left Speed130100 3 100 3 0 0 5042 0 0131[4.79s] machine: (finished: must succeed: curl -f http://localhost:8673/healthz, in 0.02 seconds)132✓ Test 1 passed: Health check OK133Test 2: Check runOnStartup...134[4.79s] machine: waiting for file '/tmp/repo1-result'135[4.80s] machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)136[4.80s] machine: must succeed: cat /tmp/repo1-result137[4.81s] machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)138✓ Test 2 passed: runOnStartup executed139Test 3: Send push webhook for repo1...140[4.81s] machine: must succeed: rm -f /tmp/repo1-result141machine # [ 2595.996548] machine dbus-broker-launch[338]: Looking up NSS user entry for 'systemd-timesync'...142machine # [ 2595.998087] machine dbus-broker-launch[338]: NSS returned no entry for 'systemd-timesync'143machine # [ 2595.998087] machine dbus-broker-launch[338]: Invalid user-name in /nix/store/gb6p7aysjaj7i3wrjq22fqq1xgsy6iyz-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync"144machine # [ 2595.998807] machine systemd[1]: Started D-Bus System Message Bus.145machine # [ 2595.999790] machine systemd[1]: Startup finished in 3.938s.146machine # [ 2596.011715] machine dbus-broker-launch[338]: Ready147[4.82s] machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)148[4.82s] machine: must succeed: 149 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=15259c7e93fe5c1d76310f128b047ec8bc59d7854155b88d66022a28075fc5e6' -d '{"ref": "refs/heads/main", "after": "abc123def456", "repository": {"full_name": "test/repo1"}, "sender": {"login": "testuser"}}' -w '%{http_code}' -o /dev/null -s150151[4.84s] machine: (finished: must succeed: 152 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=15259c7e93fe5c1d76310f128b047ec8bc59d7854155b88d66022a28075fc5e6' -d '{"ref": "refs/heads/main", "after": "abc123def456", "repository": {"full_name": "test/repo1"}, "sender": {"login": "testuser"}}' -w '%{http_code}' -o /dev/null -s153, in 0.02 seconds)154machine # [ 2596.423861] machine github-webhook[309]: [test/repo1] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result155[5.84s] machine: waiting for file '/tmp/repo1-result'156[5.85s] machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)157[5.85s] machine: must succeed: cat /tmp/repo1-result158[5.88s] machine: (finished: must succeed: cat /tmp/repo1-result, in 0.02 seconds)159✓ Test 3 passed: Push webhook triggered repo1160Test 4: Send push webhook for repo2 with env context...161[5.88s] machine: must succeed: 162 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=4b70297f69ca1f9483bd977193e89ef3a0fff4834a0501e8e76347fce9e2da19' -d '{"ref": "refs/heads/master", "after": "def456abc789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "alice"}}' -w '%{http_code}' -o /dev/null -s163164[5.90s] machine: (finished: must succeed: 165 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=4b70297f69ca1f9483bd977193e89ef3a0fff4834a0501e8e76347fce9e2da19' -d '{"ref": "refs/heads/master", "after": "def456abc789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "alice"}}' -w '%{http_code}' -o /dev/null -s166, in 0.02 seconds)167machine # [ 2597.489097] machine github-webhook[309]: [test/repo2] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo "repo2 triggered on $GH_BRANCH" > /tmp/repo2-result168[6.90s] machine: waiting for file '/tmp/repo2-result'169[6.91s] machine: (finished: waiting for file '/tmp/repo2-result', in 0.01 seconds)170[6.91s] machine: must succeed: cat /tmp/repo2-result171[6.93s] machine: (finished: must succeed: cat /tmp/repo2-result, in 0.01 seconds)172✓ Test 4 passed: Push webhook triggered repo2 with environment context173Test 5: Reject webhook for untracked branch...174[6.93s] machine: must succeed: rm -f /tmp/repo2-result175[6.94s] machine: (finished: must succeed: rm -f /tmp/repo2-result, in 0.01 seconds)176[6.94s] machine: must succeed: 177 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=d485bc2ab9974e10150aaa7ae6e38e372c6711fbbe15baf0ea82388d39cf3043' -d '{"ref": "refs/heads/feature", "after": "xyz789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "bob"}}' -w '%{http_code}' -o /dev/null -s178179[6.97s] machine: (finished: must succeed: 180 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=d485bc2ab9974e10150aaa7ae6e38e372c6711fbbe15baf0ea82388d39cf3043' -d '{"ref": "refs/heads/feature", "after": "xyz789", "repository": {"full_name": "test/repo2"}, "sender": {"login": "bob"}}' -w '%{http_code}' -o /dev/null -s181, in 0.03 seconds)182[7.97s] machine: must fail: test -f /tmp/repo2-result183[7.98s] machine: (finished: must fail: test -f /tmp/repo2-result, in 0.01 seconds)184✓ Test 5 passed: Rejected webhook for untracked branch185Test 6: Reject webhook with invalid signature...186[7.98s] machine: must succeed: rm -f /tmp/repo1-result187[7.99s] machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)188[7.99s] machine: must succeed: 189 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbaad' -d '{"ref": "refs/heads/main", "repository": {"full_name": "test/repo1"}, "sender": {"login": "eve"}}' -w '%{http_code}' -o /dev/null -s190191[8.00s] machine: (finished: must succeed: 192 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: push' -H 'X-Hub-Signature-256: sha256=badbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbadbaad' -d '{"ref": "refs/heads/main", "repository": {"full_name": "test/repo1"}, "sender": {"login": "eve"}}' -w '%{http_code}' -o /dev/null -s193, in 0.01 seconds)194[9.00s] machine: must fail: test -f /tmp/repo1-result195[9.00s] machine: (finished: must fail: test -f /tmp/repo1-result, in 0.01 seconds)196✓ Test 6 passed: Rejected webhook with invalid signature197Test 7: Accept ping event...198[9.00s] machine: must succeed: 199 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: ping' -H 'X-Hub-Signature-256: sha256=e53e1ee61790d8aa29e96127e3603888d6f33217219cb5200987f99b1d7b5a3f' -d '{"zen": "Keep it simple.", "repository": {"full_name": "test/repo1"}}' -w '%{http_code}' -o /dev/null -s200201[9.02s] machine: (finished: must succeed: 202 curl -X POST http://localhost:8673/webhooks/github -H 'Content-Type: application/json' -H 'X-GitHub-Event: ping' -H 'X-Hub-Signature-256: sha256=e53e1ee61790d8aa29e96127e3603888d6f33217219cb5200987f99b1d7b5a3f' -d '{"zen": "Keep it simple.", "repository": {"full_name": "test/repo1"}}' -w '%{http_code}' -o /dev/null -s203, in 0.01 seconds)204✓ Test 7 passed: Ping event accepted205✅ All tests passed!206[9.02s] (finished: run the VM test script, in 8.97 seconds)207[9.04s] test script finished in 8.99s208[9.04s] cleanup209[9.04s] kill NspawnMachine (pid 50)210Container machine terminated by signal KILL.211[9.11s] (finished: cleanup, in 0.06 seconds)