Skip to content
Snippets Groups Projects
Commit ac03efbb authored by Michael Meskes's avatar Michael Meskes
Browse files

Removed port testing.

parent 6355e69d
No related branches found
No related tags found
No related merge requests found
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.74 2008/11/28 23:47:51 tgl Exp $
# $PostgreSQL: pgsql/src/interfaces/ecpg/test/Makefile,v 1.75 2008/12/01 11:37:37 meskes Exp $
subdir = src/interfaces/ecpg/test
top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
# port number for temp-installation test postmaster
# this is also defined in test/connect/Makefile
TEMP_PORT = 4$(DEF_PGPORT)
# where to find psql for testing an existing installation
PSQLDIR = $(bindir)
......@@ -37,7 +33,6 @@ REGRESSDRIVER = "$(top_builddir)/src/test/regress/pg_regress.o"
all install installdirs uninstall distprep:
$(MAKE) -C connect $@
$(MAKE) -C expected $@
$(MAKE) -C sql $@
$(MAKE) -C pgtypeslib $@
$(MAKE) -C preproc $@
......@@ -46,8 +41,6 @@ all install installdirs uninstall distprep:
clean distclean maintainer-clean:
$(MAKE) -C connect $@
$(MAKE) -C connect extraclean
$(MAKE) -C expected extraclean
$(MAKE) -C sql $@
$(MAKE) -C pgtypeslib $@
$(MAKE) -C preproc $@
......@@ -88,11 +81,11 @@ endif
check: all
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
# the same options, but with --listen-on-tcp
checktcp: all
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --port=$(TEMP_PORT) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
./pg_regress --dbname=regress1,connectdb --top-builddir=$(top_builddir) --temp-install=./tmp_check --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --create-role=connectuser,connectdb --host=localhost
installcheck: all
./pg_regress --psqldir=$(PSQLDIR) --dbname=regress1,connectdb --top-builddir=$(top_builddir) --multibyte=$(MULTIBYTE) --load-language=plpgsql $(NOLOCALE) $(THREAD) --schedule=$(srcdir)/ecpg_schedule --create-role=connectuser,connectdb
......@@ -3,16 +3,6 @@ top_builddir = ../../../../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/$(subdir)/../Makefile.regress
# port number for temp-installation test postmaster
# this is also defined in ../Makefile
TEMP_PORT = 4$(DEF_PGPORT)
test1.pgc: test1.pgc.in
sed -e 's,@TEMP_PORT@,$(TEMP_PORT),g' \
$< >$@
sed -e 's,@TEMP_PORT@,$(TEMP_PORT),g' \
$(top_srcdir)/$(subdir)/../expected/connect-test1.c.in >../expected/connect-test1.c
TESTS = test1 test1.c \
test2 test2.c \
test3 test3.c \
......@@ -21,5 +11,3 @@ TESTS = test1 test1.c \
all: $(TESTS)
extraclean:
rm -f test1.pgc
......@@ -29,37 +29,28 @@ exec sql end declare section;
exec sql connect to @localhost as main user connectdb;
exec sql disconnect main;
exec sql connect to connectdb@localhost:@TEMP_PORT@ as main;
exec sql disconnect main;
exec sql connect to @localhost:@TEMP_PORT@ as main user connectdb;
exec sql disconnect main;
exec sql connect to connectdb:@TEMP_PORT@ as main;
exec sql disconnect main;
exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main;
/* exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main; */
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser identified by connectpw;
exec sql connect to tcp:postgresql://localhost/connectdb user connectuser identified by connectpw;
exec sql disconnect;
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/ user connectdb;
exec sql connect to tcp:postgresql://localhost/ user connectdb;
exec sql disconnect;
strcpy(pw, "connectpw");
strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
strcpy(db, "tcp:postgresql://localhost/connectdb");
exec sql connect to :db user connectuser using :pw;
exec sql disconnect;
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser using "connectpw";
exec sql connect to unix:postgresql://localhost/connectdb user connectuser using "connectpw";
exec sql disconnect;
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb?connect_timeout=14 user connectuser;
exec sql connect to unix:postgresql://localhost/connectdb?connect_timeout=14 user connectuser;
exec sql disconnect;
/* wrong db */
exec sql connect to tcp:postgresql://localhost:@TEMP_PORT@/nonexistant user connectuser identified by connectpw;
exec sql connect to tcp:postgresql://localhost/nonexistant user connectuser identified by connectpw;
exec sql disconnect;
/* wrong port */
......@@ -67,7 +58,7 @@ exec sql end declare section;
/* no disconnect necessary */
/* wrong password */
exec sql connect to unix:postgresql://localhost:@TEMP_PORT@/connectdb user connectuser identified by "wrongpw";
exec sql connect to unix:postgresql://localhost/connectdb user connectuser identified by "wrongpw";
/* no disconnect necessary */
return (0);
......
subdir = src/interfaces/ecpg/test/expected
top_builddir = ../../../../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/$(subdir)/../Makefile.regress
# port number for temp-installation test postmaster
# this is also defined in ../Makefile
TEMP_PORT = 5$(DEF_PGPORT)
connect-test1.c: connect-test1.c.in
sed -e 's,@TEMP_PORT@,$(TEMP_PORT),g' \
$< >$@
all: connect-test1.c
extraclean:
rm -f connect-test1.c
......@@ -60,88 +60,63 @@ main(void)
#line 30 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb@localhost:@TEMP_PORT@" , NULL, NULL , "main", 0); }
#line 32 "test1.pgc"
/* exec sql connect to :@TEMP_PORT@ as main user connectdb;
exec sql disconnect main; */
{ ECPGdisconnect(__LINE__, "main");}
#line 33 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "@localhost:@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 35 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 36 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "connectdb:@TEMP_PORT@" , NULL, NULL , "main", 0); }
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/" , "connectdb" , NULL , NULL, 0); }
#line 38 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 39 "test1.pgc"
{ ECPGconnect(__LINE__, 0, ":@TEMP_PORT@" , "connectdb" , NULL , "main", 0); }
#line 41 "test1.pgc"
{ ECPGdisconnect(__LINE__, "main");}
#line 42 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 44 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 45 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/" , "connectdb" , NULL , NULL, 0); }
#line 47 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 48 "test1.pgc"
#line 39 "test1.pgc"
strcpy(pw, "connectpw");
strcpy(db, "tcp:postgresql://localhost:@TEMP_PORT@/connectdb");
strcpy(db, "tcp:postgresql://localhost/connectdb");
{ ECPGconnect(__LINE__, 0, db , "connectuser" , pw , NULL, 0); }
#line 52 "test1.pgc"
#line 43 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 53 "test1.pgc"
#line 44 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 55 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 46 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 56 "test1.pgc"
#line 47 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb?connect_timeout=14" , "connectuser" , NULL , NULL, 0); }
#line 58 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb?connect_timeout=14" , "connectuser" , NULL , NULL, 0); }
#line 49 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 59 "test1.pgc"
#line 50 "test1.pgc"
/* wrong db */
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:@TEMP_PORT@/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
#line 62 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost/nonexistant" , "connectuser" , "connectpw" , NULL, 0); }
#line 53 "test1.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");}
#line 63 "test1.pgc"
#line 54 "test1.pgc"
/* wrong port */
{ ECPGconnect(__LINE__, 0, "tcp:postgresql://localhost:20/connectdb" , "connectuser" , "connectpw" , NULL, 0); }
#line 66 "test1.pgc"
#line 57 "test1.pgc"
/* no disconnect necessary */
/* wrong password */
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost:@TEMP_PORT@/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
#line 70 "test1.pgc"
{ ECPGconnect(__LINE__, 0, "unix:postgresql://localhost/connectdb" , "connectuser" , "wrongpw" , NULL, 0); }
#line 61 "test1.pgc"
/* no disconnect necessary */
......
......@@ -18,52 +18,36 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database <DEFAULT> on <DEFAULT> port <REGRESSION_PORT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection main closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <REGRESSION_PORT> for user connectdb
[NO_PID]: ECPGconnect: opening database <DEFAULT> on localhost port <DEFAULT> for user connectdb
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection (null) closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <DEFAULT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> with options connect_timeout=14 for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> with options connect_timeout=14 for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database nonexistant on localhost port <DEFAULT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGconnect: could not open database: FATAL: database "nonexistant" does not exist
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection nonexistant closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 on line 62: could not connect to database "nonexistant" on line 62
[NO_PID]: raising sqlcode -402 on line 53: could not connect to database "nonexistant" on line 53
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: raising sqlcode -220 on line 63: no such connection CURRENT on line 63
[NO_PID]: raising sqlcode -220 on line 54: no such connection CURRENT on line 54
[NO_PID]: sqlca: code: -220, state: 08003
[NO_PID]: ECPGconnect: opening database connectdb on localhost port <REGRESSION_PORT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
......@@ -74,7 +58,7 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_finish: connection connectdb closed
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: raising sqlcode -402 on line 66: could not connect to database "connectdb" on line 66
[NO_PID]: raising sqlcode -402 on line 57: could not connect to database "connectdb" on line 57
[NO_PID]: sqlca: code: -402, state: 08001
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <REGRESSION_PORT> for user connectuser
[NO_PID]: ECPGconnect: opening database connectdb on <DEFAULT> port <DEFAULT> for user connectuser
[NO_PID]: sqlca: code: 0, state: 00000
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment