You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: demo_locality_test.go
    path of file: ./repos/cockroach/pkg/cli
    
    the code of the file until where you have to start completion: // Copyright 2019 The Cockroach Authors.
//
// Use of this software is governed by the Business Source License
// included in the file licenses/BSL.txt.
//
// As of the Change Date specified in that file, in acc
    
func TestDemoLocality(t *testing.T) {
	defer leaktest.AfterTest(t)()
	c := NewCLITest(TestCLIParams{T: t, NoServer: true})
	defer c.Cleanup()

	// This is slow under deadlock as it starts a 9-node cluster which
	// has a very high simulated latency between each node.
	skip.UnderDeadlock(t)
	skip.UnderRace(t)

	defer democluster.TestingForceRandomizeDemoPorts()()

	setCLIDefaultsForTests()
	// We must reset the security asset loader here, otherwise the dummy
	// asset loader that is set by default in tests will not be able to
	// find the certs that demo sets up.
	securityassets.ResetLoader()

	// Using datadriven allows TESTFLAGS=-rewrite.
	datadriven.RunTest(t, datapathutils.TestDataPath(t, "demo", "test_demo_locality"), func(t *testing.T, td *datadriven.TestData) string {
		if td.Cmd != "exec" {
			t.Fatalf("unsupported command: %s", td.Cmd)
		}
		cmd := strings.Split(td.Input, "\n")
		// Disable multi-tenant for this test due to the unsupported gossip commands.
		cmd = append(cmd, "--multitenant=false")
		cmd = append(cmd, "--logtostderr")
		log.TestingResetActive()
		out, err := c.RunWithCaptureArgs(cmd)
		if err != nil {
			t.Fatal(err)
		}
		// Skip the first line, since that just echoes the command.
		_, afterFirstLine, _ := strings.Cut(out, "\n")
		return afterFirstLine
	})
}