container-test-run-github-webhook
checks.x86_64-linux.nixosTests.github-webhook.x86_64-linux
· build #145
· raw
1Machine state will be reset. To keep it, pass --keep-machine-state2start all VLans3(finished: start all VLans, in 0.00 seconds)4Initializing machine ID from random generator.5Test will time out and terminate in 120.0 seconds6run 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_ssh11machine: systemd-nspawn running (pid 50)12machine: Waiting for journal at /build/vm-state-machine/var/log/journal...13machine: 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 # [86888.298102] machine systemd-journald[71]: Journal started19machine # [86888.298146] machine systemd-journald[71]: Runtime Journal (/run/log/journal/d25e588305d64f73a3a1cda4cda04963) is 8M, max 1.2G, 1.2G free.20machine # [86888.311685] machine systemd[1]: Listening on Journal Log Access Socket.21machine # [86888.311912] machine systemd[1]: Finished Apply Kernel Variables.22machine # [86888.321650] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.23machine # [86888.332440] machine systemd[1]: Starting Flush Journal to Persistent Storage...24machine # [86888.332869] machine systemd[1]: Starting Create Static Device Nodes in /dev...25machine # [86888.345801] machine systemd-journald[71]: Time spent on flushing to /var/log/journal/d25e588305d64f73a3a1cda4cda04963 is 1.204ms for 7 entries.26machine # [86888.345801] machine systemd-journald[71]: System Journal (/var/log/journal/d25e588305d64f73a3a1cda4cda04963) is 8M, max 4G, 3.9G free.27machine # [86888.355444] machine systemd[1]: Finished Flush Journal to Persistent Storage.28machine # [86888.355712] machine systemd[1]: Finished Create Static Device Nodes in /dev.29machine # [86888.356332] machine systemd[1]: Reached target Preparation for Local File Systems.30machine # [86888.356428] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys31machine # [86888.389921] machine systemd[1]: Finished Firewall.32machine # [86889.300834] machine systemd[1]: Mounting /run/wrappers...33machine # [86889.334819] machine systemd[1]: Mounted /run/wrappers.34machine # [86889.335430] machine systemd[1]: Reached target Local File Systems.35machine # [86889.336316] machine systemd[1]: Listening on Boot Loader Control Service Socket.36machine # [86889.337047] machine systemd[1]: Starting Create SUID/SGID Wrappers...37machine # [86889.337086] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container38machine # [86889.337727] machine systemd[1]: Starting Save Transient machine-id to Disk...39machine # [86889.338355] machine systemd[1]: Starting Create System Files and Directories...40machine # [86889.359441] machine suid-sgid-wrappers-start[184]: chmod: changing permissions of '/run/wrappers/wrappers.LkIXdLPoi5/chsh': Operation not permitted41machine # [86889.364914] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE42machine # [86889.364970] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available43machine # [86889.365036] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available44machine # [86889.365067] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.45machine # [86889.365213] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.46machine # [86889.365826] machine systemd-tmpfiles[177]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted47machine # [86889.366047] machine systemd-tmpfiles[177]: fchmod() of /var/log/journal failed: Operation not permitted48machine # [86889.366211] machine systemd-tmpfiles[177]: fchmod() of /var/log/journal/d25e588305d64f73a3a1cda4cda04963 failed: Operation not permitted49machine # [86889.366432] machine systemd-tmpfiles[177]: fchmod() of /run/log/journal failed: Operation not permitted50machine # [86889.367551] machine systemd[1]: Finished Create System Files and Directories.51machine # [86889.387980] machine systemd[1]: Starting Rebuild Journal Catalog...52machine # [86889.388598] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...53machine # [86889.412048] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.54machine # [86889.413206] machine systemd[1]: Finished Save Transient machine-id to Disk.55machine # [86889.417105] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.56machine # [86889.421344] machine systemd[1]: Finished Rebuild Journal Catalog.57machine # [86889.422328] machine systemd[1]: Starting Update is Completed...58machine # [86889.440689] machine systemd[1]: Finished Update is Completed.59machine # [86889.441095] machine systemd[1]: Reached target System Initialization.60machine # [86889.441220] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container61machine # [86889.441260] machine systemd[1]: Started Daily Cleanup of Temporary Directories.62machine # [86889.441289] machine systemd[1]: Reached target Timer Units.63machine # [86889.441398] machine systemd[1]: Listening on D-Bus System Message Bus Socket.64machine # [86889.441519] machine systemd[1]: Listening on Nix Daemon Socket.65machine # [86889.442548] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).66machine # [86889.443552] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).67machine # [86889.444202] machine systemd[1]: Listening on SSH Socket.68machine # [86889.444326] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.69machine # [86889.444352] machine systemd[1]: Reached target Socket Units.70machine # [86889.444407] machine systemd[1]: Reached target Basic System.71machine # [86889.445428] machine systemd[1]: Starting Import lastlog data into lastlog2 database...72machine # [86889.446168] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...73machine # [86889.446755] machine systemd[1]: Starting resolvconf update...74machine # [86889.446776] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.75machine # [86889.468571] machine systemd[1]: Finished Import lastlog data into lastlog2 database.76machine # [86889.490504] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available77machine # [86889.490536] machine systemd[1]: nscd.service: Deactivated successfully.78machine # [86889.490686] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).79machine # [86889.492608] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...80machine # [86889.499504] machine resolvconf-start[251]: setfacl: /run/resolvconf: Operation not supported81machine # [86889.500285] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE82machine # [86889.500345] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available83machine # [86889.500395] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available84machine # [86889.500424] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.85machine # [86889.507137] machine systemd[1]: Failed to start resolvconf update.86machine # [86889.507408] machine systemd[1]: Reached target Preparation for Network.87machine # [86889.508191] machine systemd[1]: Starting Address configuration of eth1...88machine # [86889.508960] machine systemd[1]: Starting Extra networking commands....89machine # [86889.521860] machine network-addresses-eth1-start[254]: adding address 192.168.1.1/24... done90machine # [86889.524110] machine network-addresses-eth1-start[254]: adding address 2001:db8:1::1/64... done91machine # [86889.527663] machine systemd[1]: Finished Address configuration of eth1.92machine # [86889.553937] machine systemd[1]: Finished Extra networking commands..93machine # [86889.554116] machine systemd[1]: Reached target Network.94machine # [86889.554185] machine systemd[1]: Reached target Network is Online.95machine # [86889.555130] machine systemd[1]: Starting GitHub webhook listener...96machine # [86889.664397] machine nsncd[243]: Nov 01 05:58:41.476 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"97machine # [86889.664421] machine systemd[1]: Started Name Service Cache Daemon (nsncd).98machine # [86889.664482] machine systemd[1]: Reached target Host and Network Name Lookups.99machine # [86889.664537] machine systemd[1]: Reached target User and Group Name Lookups.100machine # [86889.665488] machine systemd[1]: Starting User Login Management...101machine # [86889.666066] machine systemd[1]: Starting Permit User Sessions...102machine # [86889.682327] machine systemd[1]: Finished Permit User Sessions.103machine # [86889.683316] machine systemd[1]: Started Console Getty.104machine # [86889.683352] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0105machine # [86889.683371] machine systemd[1]: Reached target Login Prompts.106machine # [86890.525143] machine systemd[1]: Started GitHub webhook listener.107machine # [86890.526553] machine github-webhook[312]: [test/repo1] running startup command108machine # [86890.531732] machine github-webhook[312]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result109machine # [86890.531732] machine github-webhook[312]: listening on :8673110machine # [86890.692644] machine systemd-logind[324]: New seat seat0.111machine # [86890.693431] machine systemd[1]: Starting D-Bus System Message Bus...112machine # [86890.693688] machine systemd[1]: Started User Login Management.113machine # [86890.694401] machine systemd[1]: Starting linger-users.service...114machine # [86890.710844] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available115machine # [86890.710891] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available116machine # [86890.710928] machine systemd[1]: linger-users.service: Deactivated successfully.117machine # [86890.711100] machine systemd[1]: Finished linger-users.service.118machine # [86890.711299] machine systemd[1]: Reached target Multi-User System.119machine # [86891.027928] machine dbus-broker-launch[341]: Looking up NSS user entry for 'systemd-timesync'...120machine # [86891.028465] machine dbus-broker-launch[341]: NSS returned no entry for 'systemd-timesync'121machine # [86891.028465] machine dbus-broker-launch[341]: Invalid user-name in /nix/store/wqx5h6pixyrpvjw50l3y7japa3fm1mry-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync"122machine # [86891.028979] machine systemd[1]: Started D-Bus System Message Bus.123machine # [86891.029215] machine systemd[1]: Startup finished in 2.978s.124machine # [86891.037501] machine dbus-broker-launch[341]: Ready125machine: (finished: waiting for unit multi-user.target, in 3.65 seconds)126machine: waiting for unit github-webhook.service127machine: (finished: waiting for unit github-webhook.service, in 0.01 seconds)128machine: waiting for TCP port 8673 on localhost129Connection to localhost (::1) 8673 port [tcp/*] succeeded!130machine: (finished: waiting for TCP port 8673 on localhost, in 0.01 seconds)131Test 1: Health check...132machine: must succeed: curl -f http://localhost:8673/healthz133 % Total % Received % Xferd Average Speed Time Time Time Current134 Dload Upload Total Spent Left Speed135100 3 100 3 0 0 3618 0 0136machine: (finished: must succeed: curl -f http://localhost:8673/healthz, in 0.01 seconds)137✓ Test 1 passed: Health check OK138Test 2: Check runOnStartup...139machine: waiting for file '/tmp/repo1-result'140machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)141machine: must succeed: cat /tmp/repo1-result142machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)143✓ Test 2 passed: runOnStartup executed144Test 3: Send push webhook for repo1...145machine: must succeed: rm -f /tmp/repo1-result146machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)147machine: 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 -s149150machine: (finished: must succeed: 151 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 -s152, in 0.01 seconds)153machine # [86891.538752] machine github-webhook[312]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result154machine: waiting for file '/tmp/repo1-result'155machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)156machine: must succeed: cat /tmp/repo1-result157machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)158✓ Test 3 passed: Push webhook triggered repo1159Test 4: Send push webhook for repo2 with env context...160machine: must succeed: 161 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 -s162163machine: (finished: 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 -s165, in 0.01 seconds)166machine # [86892.567916] machine github-webhook[312]: [test/repo2] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo "repo2 triggered on $GH_BRANCH" > /tmp/repo2-result167machine: waiting for file '/tmp/repo2-result'168machine: (finished: waiting for file '/tmp/repo2-result', in 0.01 seconds)169machine: must succeed: cat /tmp/repo2-result170machine: (finished: must succeed: cat /tmp/repo2-result, in 0.01 seconds)171✓ Test 4 passed: Push webhook triggered repo2 with environment context172Test 5: Reject webhook for untracked branch...173machine: must succeed: rm -f /tmp/repo2-result174machine: (finished: must succeed: rm -f /tmp/repo2-result, in 0.01 seconds)175machine: must succeed: 176 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 -s177178machine: (finished: 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 -s180, in 0.02 seconds)181machine: must fail: test -f /tmp/repo2-result182machine: (finished: must fail: test -f /tmp/repo2-result, in 0.01 seconds)183✓ Test 5 passed: Rejected webhook for untracked branch184Test 6: Reject webhook with invalid signature...185machine: must succeed: rm -f /tmp/repo1-result186machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)187machine: must succeed: 188 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 -s189190machine: (finished: 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 -s192, in 0.01 seconds)193machine: must fail: test -f /tmp/repo1-result194machine: (finished: must fail: test -f /tmp/repo1-result, in 0.01 seconds)195✓ Test 6 passed: Rejected webhook with invalid signature196Test 7: Accept ping event...197machine: must succeed: 198 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 -s199200machine: (finished: 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 -s202, in 0.01 seconds)203✓ Test 7 passed: Ping event accepted204✅ All tests passed!205(finished: run the VM test script, in 7.85 seconds)206test script finished in 7.87s207cleanup208kill NspawnMachine (pid 50)209Container machine terminated by signal KILL.210(finished: cleanup, in 0.06 seconds)