github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/ccl/changefeedccl/main_test.go (about)

     1  // Copyright 2018 The Cockroach Authors.
     2  //
     3  // Licensed as a CockroachDB Enterprise file under the Cockroach Community
     4  // License (the "License"); you may not use this file except in compliance with
     5  // the License. You may obtain a copy of the License at
     6  //
     7  //     https://github.com/cockroachdb/cockroach/blob/master/licenses/CCL.txt
     8  
     9  package changefeedccl
    10  
    11  import (
    12  	"os"
    13  	"testing"
    14  
    15  	_ "github.com/cockroachdb/cockroach/pkg/ccl/storageccl"
    16  	"github.com/cockroachdb/cockroach/pkg/ccl/utilccl"
    17  	"github.com/cockroachdb/cockroach/pkg/security"
    18  	"github.com/cockroachdb/cockroach/pkg/security/securitytest"
    19  	"github.com/cockroachdb/cockroach/pkg/server"
    20  	"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
    21  	"github.com/cockroachdb/cockroach/pkg/testutils/testcluster"
    22  	"github.com/cockroachdb/cockroach/pkg/util/randutil"
    23  )
    24  
    25  func TestMain(m *testing.M) {
    26  	defer utilccl.TestingEnableEnterprise()()
    27  	security.SetAssetLoader(securitytest.EmbeddedAssets)
    28  	randutil.SeedForTests()
    29  	serverutils.InitTestServerFactory(server.TestServerFactory)
    30  	serverutils.InitTestClusterFactory(testcluster.TestClusterFactory)
    31  	os.Exit(m.Run())
    32  }
    33  
    34  //go:generate ../../util/leaktest/add-leaktest.sh *_test.go