container-test-run-github-webhook
checks.x86_64-linux.nixosTests.github-webhook.x86_64-linux
· build #141
· 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 # [66229.785427] machine systemd-journald[68]: Journal started19machine # [66229.785466] machine systemd-journald[68]: Runtime Journal (/run/log/journal/670f81bef91b45c8951f107be0e1c2bd) is 8M, max 1.2G, 1.2G free.20machine # [66229.804276] machine systemd[1]: Finished Apply Kernel Variables.21machine # [66229.818690] machine systemd[1]: Finished Create Static Device Nodes in /dev gracefully.22machine # [66229.832061] machine systemd[1]: Starting Flush Journal to Persistent Storage...23machine # [66229.832488] machine systemd[1]: Starting Create Static Device Nodes in /dev...24machine # [66229.845012] machine systemd-journald[68]: Time spent on flushing to /var/log/journal/670f81bef91b45c8951f107be0e1c2bd is 1.421ms for 6 entries.25machine # [66229.845012] machine systemd-journald[68]: System Journal (/var/log/journal/670f81bef91b45c8951f107be0e1c2bd) is 8M, max 4G, 3.9G free.26machine # [66229.856988] machine systemd[1]: Finished Flush Journal to Persistent Storage.27machine # [66229.857230] machine systemd[1]: Finished Create Static Device Nodes in /dev.28machine # [66229.857986] machine systemd[1]: Reached target Preparation for Local File Systems.29machine # [66229.858070] machine systemd[1]: Rule-based Manager for Device Events and Files skipped, unmet condition check ConditionPathIsReadWrite=/sys30machine # [66229.876062] machine systemd[1]: Finished Firewall.31machine # [66230.785497] machine systemd[1]: Mounting /run/wrappers...32machine # [66230.809125] machine systemd[1]: Mounted /run/wrappers.33machine # [66230.809596] machine systemd[1]: Reached target Local File Systems.34machine # [66230.810156] machine systemd[1]: Listening on Boot Loader Control Service Socket.35machine # [66230.810694] machine systemd[1]: Starting Create SUID/SGID Wrappers...36machine # [66230.810731] machine systemd[1]: Update Boot Loader Random Seed skipped, unmet condition check ConditionVirtualization=!container37machine # [66230.811215] machine systemd[1]: Starting Save Transient machine-id to Disk...38machine # [66230.811617] machine systemd[1]: Starting Create System Files and Directories...39machine # [66230.827567] machine systemd-tmpfiles[174]: Cannot set file attributes for '/var/empty', value=0x00000010, mask=0x00000010, ignoring: Operation not permitted40machine # [66230.827805] machine systemd-tmpfiles[174]: fchmod() of /var/log/journal failed: Operation not permitted41machine # [66230.827980] machine systemd-tmpfiles[174]: fchmod() of /var/log/journal/670f81bef91b45c8951f107be0e1c2bd failed: Operation not permitted42machine # [66230.828209] machine systemd-tmpfiles[174]: fchmod() of /run/log/journal failed: Operation not permitted43machine # [66230.829671] machine suid-sgid-wrappers-start[181]: chmod: changing permissions of '/run/wrappers/wrappers.eiiOu8C7HJ/chsh': Operation not permitted44machine # [66230.829911] machine systemd[1]: Finished Create System Files and Directories.45machine # [66230.839172] machine systemd[1]: suid-sgid-wrappers.service: Main process exited, code=exited, status=1/FAILURE46machine # [66230.839210] machine systemd[1]: suid-sgid-wrappers.service: Failed to read pids.max for control group /system.slice/suid-sgid-wrappers.service, ignoring: No data available47machine # [66230.839242] 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 # [66230.839260] machine systemd[1]: suid-sgid-wrappers.service: Failed with result 'exit-code'.49machine # [66230.839348] machine systemd[1]: Failed to start Create SUID/SGID Wrappers.50machine # [66230.840672] machine systemd[1]: Starting Rebuild Journal Catalog...51machine # [66230.841138] machine systemd[1]: Starting Record System Boot/Shutdown in UTMP...52machine # [66230.849118] machine systemd[1]: Finished Record System Boot/Shutdown in UTMP.53machine # [66230.865740] machine systemd[1]: etc-machine\x2did.mount: Deactivated successfully.54machine # [66230.866302] machine systemd[1]: Finished Save Transient machine-id to Disk.55machine # [66230.866438] machine systemd[1]: Finished Rebuild Journal Catalog.56machine # [66230.867616] machine systemd[1]: Starting Update is Completed...57machine # [66230.882970] machine systemd[1]: Finished Update is Completed.58machine # [66230.883304] machine systemd[1]: Reached target System Initialization.59machine # [66230.883372] machine systemd[1]: Discard unused filesystem blocks once a week skipped, unmet condition check ConditionVirtualization=!container60machine # [66230.883404] machine systemd[1]: Started Daily Cleanup of Temporary Directories.61machine # [66230.883418] machine systemd[1]: Reached target Timer Units.62machine # [66230.883497] machine systemd[1]: Listening on D-Bus System Message Bus Socket.63machine # [66230.883568] machine systemd[1]: Listening on Nix Daemon Socket.64machine # [66230.884169] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Export).65machine # [66230.884666] machine systemd[1]: Listening on OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).66machine # [66230.884995] machine systemd[1]: Listening on SSH Socket.67machine # [66230.885076] machine systemd[1]: Listening on Virtual Machine and Container Registration Service Socket.68machine # [66230.885095] machine systemd[1]: Reached target Socket Units.69machine # [66230.885131] machine systemd[1]: Reached target Basic System.70machine # [66230.885785] machine systemd[1]: Starting Import lastlog data into lastlog2 database...71machine # [66230.886306] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...72machine # [66230.886736] machine systemd[1]: Starting resolvconf update...73machine # [66230.886752] machine systemd[1]: SSH Host Keys Generation skipped, no trigger condition checks were met.74machine # [66230.897111] machine systemd[1]: Finished Import lastlog data into lastlog2 database.75machine # [66230.918526] machine systemd[1]: nscd.service: Failed to read pids.max for control group /system.slice/nscd.service, ignoring: No data available76machine # [66230.918551] machine systemd[1]: nscd.service: Deactivated successfully.77machine # [66230.918646] machine systemd[1]: Stopped Name Service Cache Daemon (nsncd).78machine # [66230.919940] machine systemd[1]: Starting Name Service Cache Daemon (nsncd)...79machine # [66230.927212] machine resolvconf-start[249]: setfacl: /run/resolvconf: Operation not supported80machine # [66230.927618] machine systemd[1]: resolvconf.service: Main process exited, code=exited, status=1/FAILURE81machine # [66230.927658] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available82machine # [66230.927690] machine systemd[1]: resolvconf.service: Failed to read pids.max for control group /system.slice/resolvconf.service, ignoring: No data available83machine # [66230.927710] machine systemd[1]: resolvconf.service: Failed with result 'exit-code'.84machine # [66230.927800] machine systemd[1]: Failed to start resolvconf update.85machine # [66230.928238] machine systemd[1]: Reached target Preparation for Network.86machine # [66230.928812] machine systemd[1]: Starting Address configuration of eth1...87machine # [66230.929357] machine systemd[1]: Starting Extra networking commands....88machine # [66230.939743] machine network-addresses-eth1-start[251]: adding address 192.168.1.1/24... done89machine # [66230.941214] machine network-addresses-eth1-start[251]: adding address 2001:db8:1::1/64... done90machine # [66230.943392] machine systemd[1]: Finished Address configuration of eth1.91machine # [66230.964716] machine systemd[1]: Finished Extra networking commands..92machine # [66230.965131] machine systemd[1]: Reached target Network.93machine # [66230.965189] machine systemd[1]: Reached target Network is Online.94machine # [66230.965823] machine systemd[1]: Starting GitHub webhook listener...95machine # [66231.023827] machine nsncd[239]: Nov 01 00:14:22.835 INFO started, config: Config { ignored_request_types: {}, worker_count: 8, handoff_timeout: 10s }, path: "/var/run/nscd/socket"96machine # [66231.023880] machine systemd[1]: Started Name Service Cache Daemon (nsncd).97machine # [66231.023936] machine systemd[1]: Reached target Host and Network Name Lookups.98machine # [66231.023987] machine systemd[1]: Reached target User and Group Name Lookups.99machine # [66231.024802] machine systemd[1]: Starting User Login Management...100machine # [66231.025301] machine systemd[1]: Starting Permit User Sessions...101machine # [66231.041163] machine systemd[1]: Finished Permit User Sessions.102machine # [66231.042184] machine systemd[1]: Started Console Getty.103machine # [66231.042219] machine systemd[1]: Getty on tty1 skipped, unmet condition check ConditionPathExists=/dev/tty0104machine # [66231.042241] machine systemd[1]: Reached target Login Prompts.105machine # [66231.634741] machine systemd-logind[321]: New seat seat0.106machine # [66231.635485] machine systemd[1]: Starting D-Bus System Message Bus...107machine # [66231.635761] machine systemd[1]: Started User Login Management.108machine # [66231.636464] machine systemd[1]: Starting linger-users.service...109machine # [66231.643485] machine systemd[1]: Started GitHub webhook listener.110machine # [66231.644598] machine github-webhook[309]: [test/repo1] running startup command111machine # [66231.659147] machine github-webhook[309]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result112machine # [66231.659147] machine github-webhook[309]: listening on :8673113machine # [66231.654390] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available114machine # [66231.654424] machine systemd[1]: linger-users.service: Failed to read pids.max for control group /system.slice/linger-users.service, ignoring: No data available115machine # [66231.654444] machine systemd[1]: linger-users.service: Deactivated successfully.116machine # [66231.654540] machine systemd[1]: Finished linger-users.service.117machine # [66231.654614] machine systemd[1]: Reached target Multi-User System.118machine # [66231.854395] machine dbus-broker-launch[331]: Looking up NSS user entry for 'systemd-timesync'...119machine # [66231.854959] machine dbus-broker-launch[331]: NSS returned no entry for 'systemd-timesync'120machine # [66231.854959] machine dbus-broker-launch[331]: Invalid user-name in /nix/store/wqx5h6pixyrpvjw50l3y7japa3fm1mry-system-path/share/dbus-1/system.d/org.freedesktop.timesync1.conf +16: user="systemd-timesync"121machine # [66231.855389] machine systemd[1]: Started D-Bus System Message Bus.122machine # [66231.856005] machine systemd[1]: Startup finished in 2.316s.123machine # [66231.860626] machine dbus-broker-launch[331]: Ready124machine: (finished: waiting for unit multi-user.target, in 3.15 seconds)125machine: waiting for unit github-webhook.service126machine: (finished: waiting for unit github-webhook.service, in 0.01 seconds)127machine: waiting for TCP port 8673 on localhost128Connection to localhost (::1) 8673 port [tcp/*] succeeded!129machine: (finished: waiting for TCP port 8673 on localhost, in 0.01 seconds)130Test 1: Health check...131machine: must succeed: curl -f http://localhost:8673/healthz132 % Total % Received % Xferd Average Speed Time Time Time Current133 Dload Upload Total Spent Left Speed134100 3 100 3 0 0 3537 0 0135machine: (finished: must succeed: curl -f http://localhost:8673/healthz, in 0.01 seconds)136✓ Test 1 passed: Health check OK137Test 2: Check runOnStartup...138??? Warning (UserWarning): wait_for_file(): passing a bare int/float as a duration is deprecated. Use datetime.timedelta instead.139 File "/nix/store/nnab7wdwimd0gr2jj9xc8bi3rbkzkzjh-nixos-test-driver-1.1/lib/python3.14/site-packages/test_driver/duration.py", line 39140machine: waiting for file '/tmp/repo1-result'141machine: (finished: waiting for file '/tmp/repo1-result', in 0.00 seconds)142machine: must succeed: cat /tmp/repo1-result143machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)144✓ Test 2 passed: runOnStartup executed145Test 3: Send push webhook for repo1...146machine: must succeed: rm -f /tmp/repo1-result147machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.01 seconds)148machine: 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 -s150151machine: (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.01 seconds)154machine # [66232.514188] machine github-webhook[309]: [test/repo1] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo 'repo1 triggered' > /tmp/repo1-result155machine: waiting for file '/tmp/repo1-result'156machine: (finished: waiting for file '/tmp/repo1-result', in 0.01 seconds)157machine: must succeed: cat /tmp/repo1-result158machine: (finished: must succeed: cat /tmp/repo1-result, in 0.01 seconds)159✓ Test 3 passed: Push webhook triggered repo1160Test 4: Send push webhook for repo2 with env context...161machine: 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 -s163164machine: (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.01 seconds)167machine # [66233.544692] machine github-webhook[309]: [test/repo2] cmd: /nix/store/kwyi4bq5s2qgwbhz6cs4gjy57c2zdxws-bash-interactive-5.3p20/bin/bash -c echo "repo2 triggered on $GH_BRANCH" > /tmp/repo2-result168machine: waiting for file '/tmp/repo2-result'169machine: (finished: waiting for file '/tmp/repo2-result', in 0.01 seconds)170machine: must succeed: cat /tmp/repo2-result171machine: (finished: must succeed: cat /tmp/repo2-result, in 0.00 seconds)172✓ Test 4 passed: Push webhook triggered repo2 with environment context173Test 5: Reject webhook for untracked branch...174machine: must succeed: rm -f /tmp/repo2-result175machine: (finished: must succeed: rm -f /tmp/repo2-result, in 0.00 seconds)176machine: 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 -s178179machine: (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.01 seconds)182machine: must fail: test -f /tmp/repo2-result183machine: (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...186machine: must succeed: rm -f /tmp/repo1-result187machine: (finished: must succeed: rm -f /tmp/repo1-result, in 0.00 seconds)188machine: 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 -s190191machine: (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)194machine: must fail: test -f /tmp/repo1-result195machine: (finished: must fail: test -f /tmp/repo1-result, in 0.00 seconds)196✓ Test 6 passed: Rejected webhook with invalid signature197Test 7: Accept ping event...198machine: 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 -s200201machine: (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(finished: run the VM test script, in 7.32 seconds)207test script finished in 7.40s208cleanup209kill NspawnMachine (pid 50)210(finished: cleanup, in 0.03 seconds)211Container machine terminated by signal KILL.