MCPcopy Create free account
hub / github.com/dolthub/doltgresql / TestDropDatabase

Function TestDropDatabase

testing/go/drop_database_test.go:19–63  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

17import "testing"
18
19func TestDropDatabase(t *testing.T) {
20 RunScripts(t, []ScriptTest{
21 {
22 Name: "simple create database",
23 Assertions: []ScriptTestAssertion{
24 {
25 Query: "CREATE DATABASE testdb",
26 },
27 {
28 Query: "DROP DATABASE testdb",
29 },
30 },
31 },
32 {
33 Name: "with quotes",
34 Assertions: []ScriptTestAssertion{
35 {
36 Query: "CREATE DATABASE testdb",
37 },
38 {
39 Query: "DROP DATABASE \"testdb\"",
40 },
41 },
42 },
43 {
44 Name: "with hyphen",
45 Assertions: []ScriptTestAssertion{
46 {
47 Query: "CREATE DATABASE \"test-db\"",
48 },
49 {
50 Query: "USE \"test-db\"",
51 },
52 },
53 },
54 {
55 Name: "if exists",
56 Assertions: []ScriptTestAssertion{
57 {
58 Query: "DROP DATABASE IF EXISTS invalid",
59 },
60 },
61 },
62 })
63}

Callers

nothing calls this directly

Calls 1

RunScriptsFunction · 0.70

Tested by

no test coverage detected