tstest/integration: add --accept-risk=all to tailscale down

The test would fail if I was running it over SSH.

Signed-off-by: Maisem Ali <maisem@tailscale.com>
This commit is contained in:
Maisem Ali 2022-11-18 11:14:16 -08:00 committed by Brad Fitzpatrick
parent 0480a925c1
commit 41dd49391f
2 changed files with 3 additions and 2 deletions

View File

@ -18,6 +18,7 @@
var (
riskTypes []string
riskLoseSSH = registerRiskType("lose-ssh")
riskAll = registerRiskType("all")
)
func registerRiskType(riskType string) string {
@ -35,7 +36,7 @@ func registerAcceptRiskFlag(f *flag.FlagSet, acceptedRisks *string) {
// risks in acceptedRisks.
func isRiskAccepted(riskType, acceptedRisks string) bool {
for _, r := range strings.Split(acceptedRisks, ",") {
if r == riskType {
if r == riskType || r == riskAll {
return true
}
}

View File

@ -846,7 +846,7 @@ func (n *testNode) MustUp(extraArgs ...string) {
func (n *testNode) MustDown() {
t := n.env.t
t.Logf("Running down ...")
if err := n.Tailscale("down").Run(); err != nil {
if err := n.Tailscale("down", "--accept-risk=all").Run(); err != nil {
t.Fatalf("down: %v", err)
}
}