Skip to content

Commit db3af7f

Browse files
authored
test that soft-deleted objects aren't returned (#190)
1 parent 51870df commit db3af7f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

internal/provider/data_source_item_login_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,14 @@ func TestAccDataSourceItemLoginBySearch(t *testing.T) {
7979
Config: tfConfigPasswordManagerProvider() + tfConfigResourceItemLogin("search") + tfConfigResourceItemLoginDuplicate() + tfConfigDataItemLoginWithSearchAndUrl("test-username", "https://host"),
8080
Check: checkItemLogin("data.bitwarden_item_login.foo_data"),
8181
},
82+
// Test: soft-deleting objects are not returned
83+
{
84+
Config: tfConfigPasswordManagerProvider(),
85+
},
86+
{
87+
Config: tfConfigPasswordManagerProvider() + tfConfigDataItemLoginWithSearchAndOrg("test-username"),
88+
ExpectError: regexp.MustCompile("Error: no object found matching the filter"),
89+
},
8290
// Test: search for a secure note item with a login data source should fail
8391
{
8492
Config: tfConfigPasswordManagerProvider(),

0 commit comments

Comments
 (0)