Skip to content

Commit

Permalink
add unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Oct 9, 2024
1 parent 288a438 commit 671668e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 20 deletions.
20 changes: 0 additions & 20 deletions e2e_test/batch/functions/internal.slt.part

This file was deleted.

33 changes: 33 additions & 0 deletions e2e_test/batch/functions/vnode.slt.part
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
query error Function `rw_vnode` takes at least 2 arguments (0 given)
select rw_vnode();

query error Function `rw_vnode` takes at least 2 arguments (1 given)
select rw_vnode(256);

query I
select rw_vnode(256, 114, 514);
----
97

query I
select rw_vnode(4096, 114, 514);
----
1377

query error the first argument (vnode count) must not be NULL
select rw_vnode(NULL, 114, 514);

statement ok
create table vnodes (vnode int);

statement ok
insert into vnodes values (256), (4096);

statement ok
flush;

query error the first argument (vnode count) must be a constant
select rw_vnode(vnode, 114, 514) from vnodes;

statement ok
drop table vnodes;

0 comments on commit 671668e

Please sign in to comment.