Debian Codegraph @

test/features/crud_table.feature

raw
1 Feature: manipulate tables:
2 create, insert, update, select, delete from, drop
3
4 Scenario: create, insert, select from, update, drop table
5 When we connect to test database
6 then we see database connected
7 when we create table
8 then we see table created
9 when we insert into table
10 then we see record inserted
11 when we update table
12 then we see record updated
13 when we select from table
14 then we see data selected
15 when we delete from table
16 then we confirm the destructive warning
17 then we see record deleted
18 when we drop table
19 then we confirm the destructive warning
20 then we see table dropped
21 when we connect to dbserver
22 then we see database connected
23
24 Scenario: select null values
25 When we connect to test database
26 then we see database connected
27 when we select null
28 then we see null selected
29
30 Scenario: confirm destructive query
31 When we query "create table foo(x integer);"
32 and we query "delete from foo;"
33 and we answer the destructive warning with "y"
34 then we see text "Your call!"
35
36 Scenario: decline destructive query
37 When we query "delete from foo;"
38 and we answer the destructive warning with "n"
39 then we see text "Wise choice!"
40
41 # TODO (amjith). This scenario fails in GH actions but only in 3.12. Unable
42 # to reproduce locally.
43 @skip_py312
44 Scenario: no destructive warning if disabled in config
45 When we run dbcli with --no-warn
46 and we query "create table blabla(x integer);"
47 and we query "delete from blabla;"
48 Then we see text "Query OK"
49
50 Scenario: confirm destructive query with invalid response
51 When we query "delete from foo;"
52 then we answer the destructive warning with invalid "1" and see text "is not a valid boolean"