mirror of
https://github.com/tailscale/tailscale.git
synced 2025-05-21 01:38:32 +00:00
feature/taildrop: add integration test variant with profiles that exist
Updates #15970 Updates #15812 Updates tailscale/corp#28449 Change-Id: I52cf25f98636b0beac16275f46e58d0816963895 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
abe04bfa78
commit
49a7685af9
@ -26,6 +26,21 @@ import (
|
||||
// TODO(bradfitz): add test between different users with the peercap to permit that?
|
||||
|
||||
func TestTaildropIntegration(t *testing.T) {
|
||||
t.Skip("known failing test; see https://github.com/tailscale/tailscale/issues/15970")
|
||||
testTaildropIntegration(t, false)
|
||||
}
|
||||
|
||||
func TestTaildropIntegration_Fresh(t *testing.T) {
|
||||
testTaildropIntegration(t, true)
|
||||
}
|
||||
|
||||
// freshProfiles is whether to start the test right away
|
||||
// with a fresh profile. If false, tailscaled is started, stopped,
|
||||
// and restarted again to simulate a real-world scenario where
|
||||
// the first profile already existed.
|
||||
//
|
||||
// This exercises an ipnext hook ordering issue we hit earlier.
|
||||
func testTaildropIntegration(t *testing.T, freshProfiles bool) {
|
||||
tstest.Parallel(t)
|
||||
controlOpt := integration.ConfigureControl(func(s *testcontrol.Server) {
|
||||
s.AllNodesSameUser = true // required for Taildrop
|
||||
@ -39,6 +54,8 @@ func TestTaildropIntegration(t *testing.T) {
|
||||
n2 := integration.NewTestNode(t, env)
|
||||
d2 := n2.StartDaemon()
|
||||
|
||||
awaitUp := func() {
|
||||
t.Helper()
|
||||
n1.AwaitListening()
|
||||
t.Logf("n1 is listening")
|
||||
n2.AwaitListening()
|
||||
@ -51,6 +68,16 @@ func TestTaildropIntegration(t *testing.T) {
|
||||
t.Logf("n1 is running")
|
||||
n2.AwaitRunning()
|
||||
t.Logf("n2 is running")
|
||||
}
|
||||
awaitUp()
|
||||
|
||||
if !freshProfiles {
|
||||
d1.MustCleanShutdown(t)
|
||||
d2.MustCleanShutdown(t)
|
||||
d1 = n1.StartDaemon()
|
||||
d2 = n2.StartDaemon()
|
||||
awaitUp()
|
||||
}
|
||||
|
||||
var peerStableID tailcfg.StableNodeID
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user