Tenant delete by query and not select/delete on individual entities. (#492)

* tenant delete by query and not select/delete on individual entities.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix UK docs and query.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>

* Fix broken test. That event should never have been there in the first
place.

Signed-off-by: kaizimmerm <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2017-04-20 14:08:23 +02:00
committed by GitHub
parent 33d241c013
commit 3ef38e5c6a
17 changed files with 145 additions and 15 deletions

View File

@@ -25,7 +25,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import org.eclipse.hawkbit.im.authentication.SpPermission;
import org.eclipse.hawkbit.repository.event.remote.TargetAssignDistributionSetEvent;
import org.eclipse.hawkbit.repository.event.remote.TargetDeletedEvent;
import org.eclipse.hawkbit.repository.event.remote.TargetPollEvent;
import org.eclipse.hawkbit.repository.event.remote.entity.ActionCreatedEvent;
import org.eclipse.hawkbit.repository.event.remote.entity.ActionUpdatedEvent;
@@ -69,7 +68,7 @@ public class DdiRootControllerTest extends AbstractDDiApiIntegrationTest {
@WithUser(tenantId = "tenantDoesNotExists", allSpPermissions = true, authorities = { CONTROLLER_ROLE,
SYSTEM_ROLE }, autoCreateTenant = false)
@ExpectEvents({ @Expect(type = TargetCreatedEvent.class, count = 1),
@Expect(type = TargetDeletedEvent.class, count = 1), @Expect(type = TargetPollEvent.class, count = 1) })
@Expect(type = TargetPollEvent.class, count = 1) })
public void targetCannotBeRegisteredIfTenantDoesNotExistsButWhenExists() throws Exception {
mvc.perform(get("/default-tenant/", tenantAware.getCurrentTenant())).andDo(MockMvcResultPrinter.print())