Debian Codegraph @

debian/tests/30-dbeaver-tools

raw
1 #!/usr/bin/env bash
2 # ==========================================================================
3 # _ _ _ ____ ____ _____
4 # | | | (_) _ \ ___ _ __ / ___|___ _ _|_ _| __ __ _ ___ ___ _ __
5 # | |_| | | |_) / _ \ '__| | / _ \| '_ \| || '__/ _` |/ __/ _ \ '__|
6 # | _ | | __/ __/ | | |__| (_) | | | | || | | (_| | (_| __/ |
7 # |_| |_|_|_| \___|_| \____\___/|_| |_|_||_| \__,_|\___\___|_|
8 #
9 # --- High-Performance Connectivity Tracer (HiPerConTracer) ---
10 # https://www.nntb.no/~dreibh/hipercontracer/
11 # ==========================================================================
12 #
13 # High-Performance Connectivity Tracer (HiPerConTracer)
14 # Copyright (C) 2015-2026 by Thomas Dreibholz
15 #
16 # This program is free software: you can redistribute it and/or modify
17 # it under the terms of the GNU General Public License as published by
18 # the Free Software Foundation, either version 3 of the License, or
19 # (at your option) any later version.
20 #
21 # This program is distributed in the hope that it will be useful,
22 # but WITHOUT ANY WARRANTY; without even the implied warranty of
23 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 # GNU General Public License for more details.
25 #
26 # You should have received a copy of the GNU General Public License
27 # along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #
29 # Contact: [email protected]
30
31 # Bash options:
32 set -eu
33
34 cat >database1.conf <<EOF
35 dbbackend = MariaDB
36 dbserver = mariadb.hipercontracer.example
37 dbport = 12345
38 dbcafile = /just/a/test/TestCA.crt
39 dbcrlfile = /just/a/test/TestCRL.crl
40 dbcertfile = NONE
41 dbkeyfile = NONE
42 dbconnectionflags = NONE
43 dbuser = importer
44 dbpassword = $(pwgen -s 64)
45 database = test4hpct
46 dbreconnectdelay = 5
47 EOF
48
49 cat >database2.conf <<EOF
50 dbbackend = PostgreSQL
51 dbserver = postgresql.hipercontracer.example
52 dbport = 11111
53 dbcafile = /just/a/test/TestCA.crt
54 dbcrlfile = /just/a/test/TestCRL.crl
55 dbcertfile = NONE
56 dbkeyfile = NONE
57 dbconnectionflags = NONE
58 dbuser = importer
59 dbpassword = $(pwgen -s 64)
60 database = test4hpct
61 dbreconnectdelay = 5
62 EOF
63
64 /usr/bin/make-dbeaver-configuration database1.conf database2.conf
65
66 cat data-sources.json
67 cat credentials-config.json | decrypt-dbeaver-configuration - -
68
69
70 echo "Test passed!"