[debian-mysql] [PATCH] Add dep8 smoke test
Bjoern Boschman
bjoern at boschman.de
Sat Mar 29 08:51:39 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm not sure what this test is for, but this leads to a problem:
In whatever case 'SELECT bar+1 FROM foo' does not return 42 the
testuser and the testdatabase will not be deleted (due to exit 1)
Cheers
B
Am 28.03.2014 14:44, schrieb Robie Basak:
> +mysql --user=root --password=rootpassword <<EOT +CREATE DATABASE
> testdatabase; +CREATE USER 'testuser'@'localhost' identified by
> 'testpassword'; +GRANT ALL ON testdatabase.* TO
> 'testuser'@'localhost'; +EOT + +mysql --user=testuser
> --password=testpassword testdatabase <<EOT +CREATE TABLE foo (bar
> INTEGER); +INSERT INTO foo (bar) VALUES (41); +EOT + +result=`echo
> 'SELECT bar+1 FROM foo;'|mysql --batch --skip-column-names
> --user=testuser --password=testpassword testdatabase` +if [
> "$result" != "42" ]; then + echo "Unexpected result" >&2 + exit 1
> +fi + +mysql --user=testuser --password=testpassword testdatabase
> <<EOT +DROP TABLE foo; +EOT + +mysql --user=root
> --password=rootpassword <<EOT +DROP DATABASE testdatabase; +DROP
> USER 'testuser'@'localhost'; +EOT
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.21 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlM2iZsACgkQABMWRpwdNuneIgCgoOWz3/RiQg1qdXIOOm/IkBmC
4VMAniT6V9YgoTD45gD+paDrym2nU7nj
=+IT0
-----END PGP SIGNATURE-----
More information about the pkg-mysql-maint
mailing list