unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 1/3] test: replace deprecated use of notmuch_database_open_verbose
Date: Sat, 21 May 2022 15:06:29 -0300	[thread overview]
Message-ID: <20220521180631.2419225-1-david@tethera.net> (raw)

We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
---
 test/T560-lib-error.sh     | 4 +++-
 test/T562-lib-database.sh  | 4 +++-
 test/T563-lib-directory.sh | 4 +++-
 test/T564-lib-query.sh     | 4 +++-
 test/T566-lib-message.sh   | 4 +++-
 test/T568-lib-thread.sh    | 4 +++-
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
index 1f4482cb..1d45dc7d 100755
--- a/test/T560-lib-error.sh
+++ b/test/T560-lib-error.sh
@@ -206,7 +206,9 @@ int main (int argc, char** argv)
    char *msg = NULL;
    int fd;
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
diff --git a/test/T562-lib-database.sh b/test/T562-lib-database.sh
index 2314efd2..64233c37 100755
--- a/test/T562-lib-database.sh
+++ b/test/T562-lib-database.sh
@@ -17,7 +17,9 @@ int main (int argc, char** argv)
    notmuch_status_t stat = NOTMUCH_STATUS_SUCCESS;
    char *msg = NULL;
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
diff --git a/test/T563-lib-directory.sh b/test/T563-lib-directory.sh
index ebd7fcb2..22b9e0b9 100755
--- a/test/T563-lib-directory.sh
+++ b/test/T563-lib-directory.sh
@@ -18,7 +18,9 @@ int main (int argc, char** argv)
    notmuch_status_t stat = NOTMUCH_STATUS_SUCCESS;
    char *msg = NULL;
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
diff --git a/test/T564-lib-query.sh b/test/T564-lib-query.sh
index ff1d4984..53a63bf6 100755
--- a/test/T564-lib-query.sh
+++ b/test/T564-lib-query.sh
@@ -17,7 +17,9 @@ int main (int argc, char** argv)
    notmuch_status_t stat;
    char *msg = NULL;
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh
index 8b61d182..b6a9e536 100755
--- a/test/T566-lib-message.sh
+++ b/test/T566-lib-message.sh
@@ -29,7 +29,9 @@ int main (int argc, char** argv)
    notmuch_message_t *message = NULL;
    const char *id = "1258471718-6781-1-git-send-email-dottedmag@dottedmag.net";
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
diff --git a/test/T568-lib-thread.sh b/test/T568-lib-thread.sh
index b45836cd..b4c24ca2 100755
--- a/test/T568-lib-thread.sh
+++ b/test/T568-lib-thread.sh
@@ -36,7 +36,9 @@ int main (int argc, char** argv)
    notmuch_query_t *query = NULL;
    const char *id = "${THREAD}";
 
-   stat = notmuch_database_open_verbose (argv[1], NOTMUCH_DATABASE_MODE_READ_WRITE, &db, &msg);
+   stat = notmuch_database_open_with_config (argv[1],
+					     NOTMUCH_DATABASE_MODE_READ_WRITE,
+					     NULL, NULL, &db, &msg);
    if (stat != NOTMUCH_STATUS_SUCCESS) {
      fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
      exit (1);
-- 
2.35.2

             reply	other threads:[~2022-05-21 18:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21 18:06 David Bremner [this message]
2022-05-21 18:06 ` [PATCH 2/3] test: replace deprecated use of notmuch_database_open David Bremner
2022-05-21 18:06 ` [PATCH 3/3] test: replace deprecated use of notmuch_database_create David Bremner
2022-05-29 10:48 ` [PATCH 1/3] test: replace deprecated use of notmuch_database_open_verbose David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220521180631.2419225-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).