()
| 11 | |
| 12 | #[tokio::test(flavor = "multi_thread", worker_threads = 2)] |
| 13 | async fn test_clear_config_cache() -> anyhow::Result<()> { |
| 14 | // Some migrations change the `config` table in SQL. |
| 15 | // This test checks that the config cache is invalidated in `execute_migration()`. |
| 16 | |
| 17 | let t = TestContext::new().await; |
| 18 | assert_eq!(t.get_config_bool(Config::IsChatmail).await?, false); |
| 19 | |
| 20 | t.sql |
| 21 | .execute_migration( |
| 22 | "INSERT INTO config (keyname, value) VALUES ('is_chatmail', '1')", |
| 23 | 1000, |
| 24 | ) |
| 25 | .await?; |
| 26 | assert_eq!(t.get_config_bool(Config::IsChatmail).await?, true); |
| 27 | assert_eq!(t.sql.get_raw_config_int(VERSION_CFG).await?.unwrap(), 1000); |
| 28 | |
| 29 | Ok(()) |
| 30 | } |
| 31 | |
| 32 | #[tokio::test(flavor = "multi_thread", worker_threads = 2)] |
| 33 | async fn test_key_contacts_migration_autocrypt() -> Result<()> { |
nothing calls this directly
no test coverage detected