#1796 - Made the FTP copy real files. Hardcoded the DatabaseService backup folder and filename. Added db restore and final query check to the data manipulation e2e test.
This commit is contained in:
@@ -15,6 +15,8 @@ def test_data_manipulation(uc2_network):
|
||||
web_server: Server = uc2_network.get_node_by_hostname("web_server")
|
||||
db_client: DatabaseClient = web_server.software_manager.software["DatabaseClient"]
|
||||
|
||||
db_service.backup_database()
|
||||
|
||||
# First check that the DB client on the web_server can successfully query the users table on the database
|
||||
assert db_client.query("SELECT * FROM user;")
|
||||
|
||||
@@ -23,3 +25,9 @@ def test_data_manipulation(uc2_network):
|
||||
|
||||
# Now check that the DB client on the web_server cannot query the users table on the database
|
||||
assert not db_client.query("SELECT * FROM user;")
|
||||
|
||||
# Now restore the database
|
||||
db_service.restore_backup()
|
||||
|
||||
# Now check that the DB client on the web_server can successfully query the users table on the database
|
||||
assert db_client.query("SELECT * FROM user;")
|
||||
|
||||
Reference in New Issue
Block a user