Skip to content

Commit

Permalink
Add upgrade tests
Browse files Browse the repository at this point in the history
  • Loading branch information
basasairohan committed Jan 10, 2024
1 parent c7a02d1 commit 4805c4e
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/JDBC/expected/babel-4688-vu-cleanup.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
drop view babel_4688_v1
go

drop view babel_4688_v2
go

drop view babel_4688_v3
go

drop view babel_4688_v4
go
17 changes: 17 additions & 0 deletions test/JDBC/expected/babel-4688-vu-prepare.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
create view babel_4688_v1 as select cast(cast('a' as binary(2)) as varchar(2))
go

create view babel_4688_v2 as select cast(cast('a' as binary(2)) as pg_catalog.varchar(2))
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'ignore';
go

create view babel_4688_v3 as select cast(cast('ab' as rowversion) as varchar(2))
go

create view babel_4688_v4 as select cast(cast('ab' as rowversion) as pg_catalog.varchar(2))
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'strict';
go
37 changes: 37 additions & 0 deletions test/JDBC/expected/babel-4688-vu-verify.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
select * from babel_4688_v1
go
~~START~~
varchar
a
~~END~~


select * from babel_4688_v2
go
~~START~~
varchar
a
~~END~~


EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'ignore';
go

select * from babel_4688_v3
go
~~START~~
varchar
ab
~~END~~


select * from babel_4688_v4
go
~~START~~
varchar
ab
~~END~~


EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'strict';
go
11 changes: 11 additions & 0 deletions test/JDBC/input/babel-4688-vu-cleanup.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
drop view babel_4688_v1
go

drop view babel_4688_v2
go

drop view babel_4688_v3
go

drop view babel_4688_v4
go
17 changes: 17 additions & 0 deletions test/JDBC/input/babel-4688-vu-prepare.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
create view babel_4688_v1 as select cast(cast('a' as binary(2)) as varchar(2))
go

create view babel_4688_v2 as select cast(cast('a' as binary(2)) as pg_catalog.varchar(2))
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'ignore';
go

create view babel_4688_v3 as select cast(cast('ab' as rowversion) as varchar(2))
go

create view babel_4688_v4 as select cast(cast('ab' as rowversion) as pg_catalog.varchar(2))
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'strict';
go
17 changes: 17 additions & 0 deletions test/JDBC/input/babel-4688-vu-verify.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
select * from babel_4688_v1
go

select * from babel_4688_v2
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'ignore';
go

select * from babel_4688_v3
go

select * from babel_4688_v4
go

EXEC sp_babelfish_configure 'babelfishpg_tsql.escape_hatch_rowversion', 'strict';
go

0 comments on commit 4805c4e

Please sign in to comment.