container-test-run-github-webhook
checks.x86_64-linux.nixosTests.github-webhook.x86_64-linux
· build #155
· 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.01 seconds)4Initializing machine ID from random generator.5[0.10s] Test will time out and terminate in 120.0 seconds6[0.11s] 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.12s] machine: systemd-nspawn running (pid 50)12[0.12s] machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13[0.12s] 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 # No journal files were found.21machine # No journal boot entry found for the specified boot (+0).22machine # [769884.521862] machine systemd-journald[67]: Journal started23machine # [769884.523126] machine systemd-journald[67]: Runtime Journal (/run/log/journal/d5999bc8b36245af95ffb241ada17785) is 8M, max 1.2G, 1.2G free.24machine # [769884.568124] machine systemd[1]: Finished Apply Kernel Variables.25machine # [769884.601695] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.26machine # [769884.650324] machine systemd[1]: Starting Flush Journal to Persistent Storage...27machine # [769884.655275] machine systemd[1]: Starting Create Static Device Nodes in /dev...28machine # [769884.692050] machine systemd-journald[67]: Time spent on flushing to /var/log/journal/d5999bc8b36245af95ffb241ada17785 is 1.580ms for 6 entries.29machine # [769884.692050] machine systemd-journald[67]: System Journal (/var/log/journal/d5999bc8b36245af95ffb241ada17785) is 8M, max 4G, 3.9G free.30machine # [769884.734988] machine systemd[1]: Finished Create Static Device Nodes in /dev.31machine # [769884.735712] machine systemd[1]: Reached target Preparation for Local File Systems.32machine # [769884.735882] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys33machine # [769884.749533] machine systemd[1]: Finished Flush Journal to Persistent Storage.34machine # [769884.844244] machine systemd[1]: Finished Firewall.35machine # [769885.532098] machine systemd[1]: Mounting /run/wrappers...36machine # [769885.632214] machine systemd[1]: Mounted /run/wrappers.37machine # [769885.632876] machine systemd[1]: Reached target Local File Systems.38machine # [769885.636873] machine systemd[1]: Listening on Boot Loader Control Service Socket.39machine # [769885.641701] machine systemd[1]: Starting Create SUID/SGID Wrappers...40machine # [769885.641751] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container41machine # [769885.643889] machine systemd[1]: Starting Save Transient machine-id to Disk...42machine # [769885.664236] machine systemd[1]: Starting Create System Files and Directories...43machine # [769885.717972] machine systemd-tmpfiles[173]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted44machine # [769885.722406] machine systemd-tmpfiles[173]: fchmod() of /var/log/journal failed: Operation not permitted45machine # [769885.723250] machine systemd-tmpfiles[173]: fchmod() of /var/log/journal/d5999bc8b36245af95ffb241ada17785 failed: Operation not permitted46machine # [769885.723991] machine systemd-tmpfiles[173]: fchmod() of /run/log/journal failed: Operation not permitted47machine # [769885.727099] machine suid-sgid-wrappers-start[180]: chmod: changing permissions of '/run/wrappers/wrappers.8LugzhNfCZ/chsh': Operation not permitted48machine # [769885.728443] machine systemd[1]: Finished Create System Files and Directories.49machine # [769885.780267] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE50machine # [769885.781969] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available51machine # [769885.782181] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available52machine # [769885.782584] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.53machine # [769885.783733] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.54machine # [769885.789382] machine systemd[1]: Starting Rebuild Journal Catalog...55machine # [769885.793276] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...56machine # [769885.819731] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.57machine # [769885.888681] machine systemd[1]: Finished Rebuild Journal Catalog.58machine # [769885.893353] machine systemd[1]: Starting Update is Completed...59machine # [769885.932527] machine systemd[1]: Finished Update is Completed.60machine # [769885.932881] machine systemd[1]: Reached target System Initialization.61machine # [769885.933417] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container62machine # [769885.933462] machine systemd[1]: Started Daily Cleanup of Temporary Directories.63machine # [769885.933742] machine systemd[1]: Reached target Timer Units.64machine # [769885.934165] machine systemd[1]: Listening on D-Bus System Message Bus Socket.65machine # [769885.934398] machine systemd[1]: Listening on Nix Daemon Socket.66machine # [769885.937214] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).67machine # [769885.940386] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).68machine # [769885.943324] machine systemd[1]: Listening on SSH Socket.69machine # [769885.943836] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.70machine # [769885.943878] machine systemd[1]: Reached target Socket Units.71machine # [769885.944384] machine systemd[1]: Reached target Basic System.72machine # [769885.950208] machine systemd[1]: Starting Import lastlog data into lastlog2 database...73machine # [769885.954602] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...74machine # [769885.958218] machine systemd[1]: Starting resolvconf update...75machine # [769885.958251] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.76machine # [769886.004909] machine systemd[1]: Finished Import lastlog data into lastlog2 database.77machine # [769886.144320] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available78machine # [769886.144372] machine systemd[1]: nscd.service: Deactivated successfully.79machine # [769886.145339] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).80machine # [769886.153231] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...81machine # [769886.163906] machine resolvconf-start[246]: setfacl: /run/resolvconf: Operation not supported82machine # [769886.165407] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE83machine # [769886.165482] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available84machine # [769886.165545] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available85machine # [769886.165578] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.86machine # [769886.168347] machine systemd[1]: Failed to start resolvconf update.87machine # [769886.168728] machine systemd[1]: Reached target Preparation for Network.88machine # [769886.174089] machine systemd[1]: Starting Address configuration of eth1...89machine # [769886.178396] machine systemd[1]: Starting Extra networking commands....90machine # [769886.249665] machine network-addresses-eth1-start[249]: adding address 192.168.1.1/24... done91machine # [769886.268062] machine network-addresses-eth1-start[249]: adding address 2001:db8:1::1/64... done92machine # [769886.280932] machine systemd[1]: Finished Address configuration of eth1.93machine # [769886.385267] machine systemd[1]: Finished Extra networking commands..94machine # [769886.385400] machine systemd[1]: Reached target Network.95machine # [769886.386386] machine systemd[1]: Reached target Network is Online.96machine # [769886.395741] machine systemd[1]: Starting GitHub webhook listener...97machine # [769886.640652] machine nsncd[240]: Nov 09 03:41:58.452 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"98machine # [769886.642478] machine systemd[1]: Started Name Service Cache Daemon (nsncd).99machine # [769886.642569] machine systemd[1]: Reached target Host and Network Name Lookups.100machine # [769886.642650] machine systemd[1]: Reached target User and Group Name Lookups.101machine # [769886.649058] machine systemd[1]: Starting User Login Management...102machine # [769886.652841] machine systemd[1]: Starting Permit User Sessions...103machine # [769886.678794] machine systemd[1]: Finished Permit User Sessions.104machine # [769886.683933] machine systemd[1]: Started Console Getty.105machine # [769886.683984] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0106machine # [769886.684016] machine systemd[1]: Reached target Login Prompts.107machine # [769886.914547] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.108machine # [769886.918333] machine systemd[1]: Finished Save Transient machine-id to Disk.109machine # [769889.160371] machine systemd-logind[319]: New seat seat0.110machine # [769889.163730] machine systemd[1]: Started User Login Management.111machine # [769889.170928] machine systemd[1]: Starting D-Bus System Message Bus...112machine # [769889.174521] machine systemd[1]: Starting linger-users.service...113machine # [769889.207063] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available114machine # [769889.207169] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available115machine # [769889.207200] machine systemd[1]: linger-users.service: Deactivated successfully.116machine # [769889.207427] machine systemd[1]: Finished linger-users.service.117machine # [769889.390719] machine systemd[1]: Started GitHub webhook listener.118machine # [769889.394982] machine systemd[1]: Reached target Multi-User System.119machine # [769889.397708] machine github-webhook[307]: [test/repo1] running startup command120machine # [769889.450716] machine github-webhook[307]: [test/repo1] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result121machine # [769889.450716] machine github-webhook[307]: listening on :8673122[7.79s] machine: (finished: waiting for unit multi-user.target, in 7.67 seconds)123[7.79s] machine: waiting for unit github-webhook.service124[7.82s] machine: (finished: waiting for unit github-webhook.service, in 0.02 seconds)125[7.82s] machine: waiting for TCP port 8673 on localhost126Connection to localhost (::1) 8673 port [tcp/*] succeeded!127[7.84s] machine: (finished: waiting for TCP port 8673 on localhost, in 0.02 seconds)128Test 1: Health check...129[7.84s] machine: must succeed: curl -f http://localhost:8673/healthz130 % Total % Received % Xferd Average Speed Time Time Time Current131 Dload Upload Total Spent Left Speed132100 3 100 3 0 0 3978 0 0133[7.85s] machine: (finished: must succeed: curl -f http://localhost:8673/healthz, in 0.02 seconds)134✓ Test 1 passed: Health check OK135Test 2: Check runOnStartup...136[7.85s] machine: waiting for file '/tmp/repo1-result'137[7.87s] machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)138[7.87s] machine: must succeed: cat /tmp/repo1-result139[7.87s] machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)140✓ Test 2 passed: runOnStartup executed141Test 3: Send push webhook for repo1...142[7.87s] machine: must succeed: rm -f /tmp/repo1-result143[7.88s] machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)144[7.88s] machine: must succeed: 145 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 -s146147[7.90s] machine: (finished: must succeed: 148 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 -s149, in 0.02 seconds)150machine # [769889.917533] machine dbus-broker-launch[330]: Looking up NSS user entry for 'systemd-timesync'...151machine # [769889.920611] machine dbus-broker-launch[330]: NSS returned no entry for 'systemd-timesync'152machine # [769889.920611] machine dbus-broker-launch[330]: Invalid user-name in /nix/store/lhjxk0k05r4ww1jng5kdimjrn6axm5zh-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync"153machine # [769889.920321] machine systemd[1]: Started D-Bus System Message Bus.154machine # [769889.920649] machine systemd[1]: Startup finished in 6.204s.155machine # [769889.933736] machine dbus-broker-launch[330]: Ready156machine # [769890.194974] machine github-webhook[307]: [test/repo1] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result157[8.90s] machine: waiting for file '/tmp/repo1-result'158[8.91s] machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)159[8.91s] machine: must succeed: cat /tmp/repo1-result160[8.93s] machine: (finished: must succeed: cat /tmp/repo1-result, in 0.02 seconds)161✓ Test 3 passed: Push webhook triggered repo1162Test 4: Send push webhook for repo2 with env context...163[8.93s] machine: must succeed: 164 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 -s165166[8.97s] machine: (finished: must succeed: 167 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 -s168, in 0.04 seconds)169machine # [769891.261855] machine github-webhook[307]: [test/repo2] cmd: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -c echo "repo2 triggered on $GH_BRANCH" > /tmp/repo2-result170[9.97s] machine: waiting for file '/tmp/repo2-result'171[9.99s] machine: (finished: waiting for file '/tmp/repo2-result', in 0.02 seconds)172[9.99s] machine: must succeed: cat /tmp/repo2-result173[10.02s] machine: (finished: must succeed: cat /tmp/repo2-result, in 0.03 seconds)174✓ Test 4 passed: Push webhook triggered repo2 with environment context175Test 5: Reject webhook for untracked branch...176[10.02s] machine: must succeed: rm -f /tmp/repo2-result177[10.04s] machine: (finished: must succeed: rm -f /tmp/repo2-result, in 0.02 seconds)178[10.04s] machine: must succeed: 179 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 -s180181[10.09s] machine: (finished: must succeed: 182 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 -s183, in 0.05 seconds)184[11.09s] machine: must fail: test -f /tmp/repo2-result185[11.12s] machine: (finished: must fail: test -f /tmp/repo2-result, in 0.02 seconds)186✓ Test 5 passed: Rejected webhook for untracked branch187Test 6: Reject webhook with invalid signature...188[11.12s] machine: must succeed: rm -f /tmp/repo1-result189[11.14s] machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.03 seconds)190[11.15s] machine: must succeed: 191 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 -s192193[11.20s] machine: (finished: must succeed: 194 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 -s195, in 0.05 seconds)196[12.20s] machine: must fail: test -f /tmp/repo1-result197[12.23s] machine: (finished: must fail: test -f /tmp/repo1-result, in 0.03 seconds)198✓ Test 6 passed: Rejected webhook with invalid signature199Test 7: Accept ping event...200[12.23s] machine: must succeed: 201 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 -s202203[12.28s] machine: (finished: must succeed: 204 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 -s205, in 0.05 seconds)206✓ Test 7 passed: Ping event accepted207✅ All tests passed!208[12.28s] (finished: run the VM test script, in 12.17 seconds)209[13.26s] test script finished in 13.16s210[13.26s] cleanup211[13.26s] kill NspawnMachine (pid 50)212Container machine terminated by signal KILL.213[13.42s] (finished: cleanup, in 0.17 seconds)