tstest/integration/vms: smoke test derphttp through mitm proxies

Updates #4377

Very smoky/high-level test to ensure that derphttp internals play well
with an agressive (stare + bump) meddler-in-the-middle proxy.

Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
Tom DNetto
2022-04-12 13:04:36 -07:00
committed by Tom
parent 2748750aa2
commit dec68166e4
5 changed files with 175 additions and 20 deletions

View File

@@ -23,6 +23,7 @@ import (
"strconv"
"strings"
"testing"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
@@ -49,6 +50,19 @@ func (vm *vmInstance) running() bool {
}
}
func (vm *vmInstance) waitStartup(t *testing.T) {
t.Helper()
for i := 0; i < 100; i++ {
if vm.running() {
break
}
time.Sleep(100 * time.Millisecond)
}
if !vm.running() {
t.Fatal("vm not running")
}
}
func (h *Harness) makeImage(t *testing.T, d Distro, cdir string) string {
if !strings.HasPrefix(d.Name, "nixos") {
t.Fatal("image generation for non-nixos is not implemented")