From 0f65e4dd918cd92a02c9e9365f18277d61edb6cf Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Tue, 2 May 2023 14:18:18 +0300 Subject: [PATCH] MT#56542 Skip schemes and tables in 3308 instance The instance 3308 doesn't have all schemes, also some tables are missing. Change-Id: I84b6d900469c4cdcf037ba4c34d6cb70a3979b8e --- helper/compare_dbs.pl | 6 ++++++ sbin/ngcp-mysql-compare-dbs | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/helper/compare_dbs.pl b/helper/compare_dbs.pl index 3600eed..bacd656 100755 --- a/helper/compare_dbs.pl +++ b/helper/compare_dbs.pl @@ -23,6 +23,7 @@ use JSON::XS; my @diff_exceptions = qw( views/ldap/ldap_entries/view_definition tables/mysql/.+/create_options + .+/prosody/prosodyarchive ); my $credentials_file = '/etc/mysql/sipwise_extra.cnf'; @@ -149,6 +150,11 @@ __SQL__ , }; +if ( $argv->{port_db1} eq '3308' ) { + push @diff_exceptions, '.+/kamailio/voicemail_spool'; + push @diff_exceptions, '.+/provisioning/autoprov_firmwares_data'; +} + my $schema1 = "DBI:mysql:$argv->{schema_name};host=$argv->{host_db1};port=$argv->{port_db1};mysql_read_default_file=$credentials_file"; my $dbh1 = DBI->connect( $schema1, diff --git a/sbin/ngcp-mysql-compare-dbs b/sbin/ngcp-mysql-compare-dbs index ddc1975..decf89c 100755 --- a/sbin/ngcp-mysql-compare-dbs +++ b/sbin/ngcp-mysql-compare-dbs @@ -80,6 +80,14 @@ for local_mysql in "${local_instances[@]}"; do for schema in "${schemes[@]}"; do schema_name="${schema##*/}" schema_name="${schema_name%.json}" + if [[ "${local_mysql}" =~ 3308 ]]; then + case "${schema_name}" in + syslog|stats|fileshare|ldap|accounting|sipstats) + echo "Skipping schema ${schema_name} on ${local_mysql} instance" + continue + ;; + esac + fi if ! /usr/share/ngcp-system-tests/compare_dbs.pl \ --host-db1="${local_mysql%:*}" \ --port-db1="${local_mysql#*:}" \