From db3af7f4078c7857deab668c5832d6971bb38a74 Mon Sep 17 00:00:00 2001 From: Maxime Lagresle Date: Mon, 18 Nov 2024 09:34:18 +0100 Subject: [PATCH] test that soft-deleted objects aren't returned (#190) --- internal/provider/data_source_item_login_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/provider/data_source_item_login_test.go b/internal/provider/data_source_item_login_test.go index 0a97a94..81f92a6 100644 --- a/internal/provider/data_source_item_login_test.go +++ b/internal/provider/data_source_item_login_test.go @@ -79,6 +79,14 @@ func TestAccDataSourceItemLoginBySearch(t *testing.T) { Config: tfConfigPasswordManagerProvider() + tfConfigResourceItemLogin("search") + tfConfigResourceItemLoginDuplicate() + tfConfigDataItemLoginWithSearchAndUrl("test-username", "https://host"), Check: checkItemLogin("data.bitwarden_item_login.foo_data"), }, + // Test: soft-deleting objects are not returned + { + Config: tfConfigPasswordManagerProvider(), + }, + { + Config: tfConfigPasswordManagerProvider() + tfConfigDataItemLoginWithSearchAndOrg("test-username"), + ExpectError: regexp.MustCompile("Error: no object found matching the filter"), + }, // Test: search for a secure note item with a login data source should fail { Config: tfConfigPasswordManagerProvider(),