tailscale: re-enable tests

This commit is contained in:
06kellyjac
2025-03-02 22:12:08 +00:00
parent a0ec8cf1e4
commit 079c28fb81
+59 -1
View File
@@ -65,6 +65,12 @@ buildGoModule {
"cmd/tsidp"
];
excludedPackages = [
# exlude integration tests which fail to work
# and require additional tooling
"tstest/integration"
];
ldflags = [
"-w"
"-s"
@@ -76,7 +82,59 @@ buildGoModule {
"ts_include_cli"
];
doCheck = false;
# remove vendored tooling to ensure it's not used
# also avoids some unnecessary tests
preBuild = ''
rm -rf ./tool
'';
preCheck = ''
# feed in all tests for testing
# subPackages above limits what is built to just what we
# want but also limits the tests
unset subPackages
# several tests hang
rm tsnet/tsnet_test.go
'';
checkFlags =
let
skippedTests = [
# dislikes vendoring
"TestPackageDocs" # .
# tries to start tailscaled
"TestContainerBoot" # cmd/containerboot
# just part of a tool which generates yaml for k8s CRDs
# requires helm
"Test_generate" # cmd/k8s-operator/generate
# self reported potentially flakey test
"TestConnMemoryOverhead" # control/controlbase
# interacts with `/proc/net/route` and need a default route
"TestDefaultRouteInterface" # net/netmon
"TestRouteLinuxNetlink" # net/netmon
"TestGetRouteTable" # net/routetable
# remote udp call to 8.8.8.8
"TestDefaultInterfacePortable" # net/netutil
# launches an ssh server which works when provided openssh
# also requires executing commands but nixbld user has /noshell
"TestSSH" # ssh/tailssh
# wants users alice & ubuntu
"TestMultipleRecorders" # ssh/tailssh
"TestSSHAuthFlow" # ssh/tailssh
"TestSSHRecordingCancelsSessionsOnUploadFailure" # ssh/tailssh
"TestSSHRecordingNonInteractive" # ssh/tailssh
# test for a dev util which helps to fork golang.org/x/crypto/acme
# not necessary and fails to match
"TestSyncedToUpstream" # tempfork/acme
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
postInstall =
''