#!/usr/bin/env bats load $BATS_TEST_DIRNAME/helper/common.bash setup() { setup_common dolt sql < " send -- "select sleep(1);\r" expect { timeout { puts "test failure: expected to see a query result that took ~1 second, but did not" exit 1; } "1 row in set (1" } } expect "> " send -- "quit;\r" expect eof ' } @test "sql-shell: dolt_thread_dump" { run dolt sql <<< "call dolt_thread_dump();" [ $status -eq 0 ] [[ "$output" =~ "github.com/dolthub/dolt/go" ]] || false [[ "$output" =~ "github.com/dolthub/go-mysql-server" ]] || false } # bats test_tags=no_lambda @test "sql-shell: commit time set correctly in shell" { skiponwindows "Need to install expect and make this script work on windows." run $BATS_TEST_DIRNAME/sql-shell-commit-time.expect [ "$status" -eq 0 ] }