mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 11:52:00 -04:00
tstest/natlab: ignore transport errors during gokrazy update (#21441)
In my testing using TCG, I hit non-EOF network errors that made this test fail. Since we already poll and check the image version later, we can treat this response as best-effort. Resolves #21440 Change-Id: Ia923fc2c199aae7a543d00e06d25a375512daa01 Signed-off-by: Francois Marier <francois@tailscale.com>
This commit is contained in:
1 parent
0931824b5f
commit
02de76ba62
1 file changed
+4
-3
@@ -8,7 +8,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
@@ -52,8 +52,9 @@ func TestGokrazyUpdatesItselfToSameImage(t *testing.T) {
|
||||
"--unsigned",
|
||||
)
|
||||
if err != nil {
|
||||
if errors.Is(err, io.EOF) {
|
||||
t.Logf("update command connection ended during reboot: %v", err)
|
||||
if urlError, ok := errors.AsType[*url.Error](err); ok {
|
||||
// Ignore transport errors
|
||||
t.Logf("update command connection lost during reboot: %v", urlError)
|
||||
} else {
|
||||
t.Fatalf("gokrazy update command failed: %v\n%s", err, out)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user