Merge pull request #568 from juanfont/reduce-containers-int-tests

Reduce the number of containers in integration tests
This commit is contained in:
Juan Font 2022-05-01 08:07:29 +02:00 committed by GitHub
commit 02a78e5a45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

3
app.go
View File

@ -322,7 +322,8 @@ func (h *Headscale) expireEphemeralNodesWorker() {
func (h *Headscale) grpcAuthenticationInterceptor(ctx context.Context, func (h *Headscale) grpcAuthenticationInterceptor(ctx context.Context,
req interface{}, req interface{},
info *grpc.UnaryServerInfo, info *grpc.UnaryServerInfo,
handler grpc.UnaryHandler) (interface{}, error) { handler grpc.UnaryHandler,
) (interface{}, error) {
// Check if the request is coming from the on-server client. // Check if the request is coming from the on-server client.
// This is not secure, but it is to maintain maintainability // This is not secure, but it is to maintain maintainability
// with the "legacy" database-based client // with the "legacy" database-based client

View File

@ -122,7 +122,7 @@ func (h *Headscale) DERPHandler(ctx *gin.Context) {
if !fastStart { if !fastStart {
pubKey := h.privateKey.Public() pubKey := h.privateKey.Public()
pubKeyStr := pubKey.UntypedHexString() // nolint pubKeyStr := pubKey.UntypedHexString()
fmt.Fprintf(conn, "HTTP/1.1 101 Switching Protocols\r\n"+ fmt.Fprintf(conn, "HTTP/1.1 101 Switching Protocols\r\n"+
"Upgrade: DERP\r\n"+ "Upgrade: DERP\r\n"+
"Connection: Upgrade\r\n"+ "Connection: Upgrade\r\n"+

View File

@ -47,11 +47,11 @@ func TestIntegrationTestSuite(t *testing.T) {
s.namespaces = map[string]TestNamespace{ s.namespaces = map[string]TestNamespace{
"thisspace": { "thisspace": {
count: 15, count: 10,
tailscales: make(map[string]dockertest.Resource), tailscales: make(map[string]dockertest.Resource),
}, },
"otherspace": { "otherspace": {
count: 5, count: 2,
tailscales: make(map[string]dockertest.Resource), tailscales: make(map[string]dockertest.Resource),
}, },
} }