gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] 02/02: Integration tests.


From: gnunet
Subject: [libeufin] 02/02: Integration tests.
Date: Fri, 13 Nov 2020 18:52:35 +0100

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

commit 5a8ac4b3cad1340b0ce01ac7432c3c59c2b4af80
Author: MS <ms@taler.net>
AuthorDate: Fri Nov 13 18:50:10 2020 +0100

    Integration tests.
    
    Provide method to empty all tables from sandbox and nexus.
    Useful to provide a fresh testing environment without stop
    services -> delete sqlite files -> start services again.
---
 integration-tests/util.py | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/integration-tests/util.py b/integration-tests/util.py
index 76d68bc..27d8d17 100644
--- a/integration-tests/util.py
+++ b/integration-tests/util.py
@@ -46,6 +46,43 @@ def kill(name, s):
     s.terminate()
     s.wait()
 
+def flushTablesSandbox(dbName):
+    check_call(
+        ["sqlite3",
+         dbName,
+         "DELETE FROM BankAccountReports",
+         "DELETE FROM EbicsOrderSignatures",
+         "DELETE FROM BankAccountStatements",
+         "DELETE FROM EbicsSubscriberPublicKeys",
+         "DELETE FROM BankAccountTransactions",
+         "DELETE FROM EbicsSubscribers",
+         "DELETE FROM BankAccounts",
+         "DELETE FROM EbicsUploadTransactionChunks",
+         "DELETE FROM EbicsDownloadTransactions",
+         "DELETE FROM EbicsUploadTransactions",
+         "DELETE FROM EbicsHosts"
+        ]
+     )
+
+def flushTablesNexus(dbName):
+    check_call(
+        ["sqlite3",
+         dbName,
+         "DELETE FROM EbicsSubscribers",
+         "DELETE FROM NexusBankTransactions",
+         "DELETE FROM TalerFacadeState",
+         "DELETE FROM Facades",
+         "DELETE FROM NexusScheduledTasks",
+         "DELETE FROM TalerIncomingPayments",
+         "DELETE FROM NexusBankAccounts",
+         "DELETE FROM NexusUsers",
+         "DELETE FROM TalerRequestedPayments",
+         "DELETE FROM NexusBankConnections",
+         "DELETE FROM OfferedBankAccounts",
+         "DELETE FROM NexusBankMessages",
+         "DELETE FROM PaymentInitiations"
+        ]
+    )
 
 def startSandbox(dbname="sandbox-test.sqlite3"):
     db_full_path = str(Path.cwd() / dbname)

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]