github.com/cockroachdb/cockroach@v20.2.0-alpha.1+incompatible/pkg/cli/interactive_tests/test_demo_telemetry.tcl (about)

     1  #! /usr/bin/env expect -f
     2  
     3  source [file join [file dirname $argv0] common.tcl]
     4  
     5  start_test "Check cockroach demo telemetry and license check can be disabled"
     6  
     7  # set the proper environment variable
     8  set env(COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING) "true"
     9  spawn $argv demo
    10  
    11  # Expect an informational message.
    12  eexpect "Telemetry and automatic license acquisition disabled by configuration."
    13  
    14  # wait for the CLI to start up
    15  eexpect "movr>"
    16  # send a request for an enterprise feature
    17  send "alter table vehicles partition by list (city) (partition p1 values in ('nyc'));\n"
    18  # expect that it failed, as no license was requested.
    19  eexpect "use of partitions requires an enterprise license"
    20  # clean up after the test
    21  interrupt
    22  eexpect eof
    23  
    24  end_test