3e45e5b420
QR codes are used by `tailscale up --qr` to provide an easy way to open a web-page without transcribing a difficult URI. However, there’s no need for this feature if the client will never be called interactively. So this PR adds the `ts_omit_qrcodes` build tag. Updates #18182 Signed-off-by: Simon Law <sfllaw@tailscale.com>
23 lines
412 B
Go
23 lines
412 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package main
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"tailscale.com/tstest/deptest"
|
|
)
|
|
|
|
func TestOmitQRCodes(t *testing.T) {
|
|
const msg = "unexpected with ts_omit_qrcodes"
|
|
deptest.DepChecker{
|
|
GOOS: "linux",
|
|
GOARCH: "amd64",
|
|
Tags: "ts_omit_qrcodes",
|
|
BadDeps: map[string]string{
|
|
"github.com/skip2/go-qrcode": msg,
|
|
},
|
|
}.Check(t)
|
|
}
|