Exemplo n.º 1
0
        public virtual void testQueryNoAuthenticatedTenantsForDeploymentStatistics()
        {
            identityService.setAuthentication("user", null, null);

            DeploymentStatisticsQuery query = managementService.createDeploymentStatisticsQuery();

            assertThat(query.count(), @is(1L));

            ISet <string> tenantIds = collectDeploymentTenantIds(query.list());

            assertThat(tenantIds.Count, @is(1));
            assertThat(tenantIds.GetEnumerator().next(), @is(nullValue()));
        }
Exemplo n.º 2
0
        public virtual void testQueryAuthenticatedTenantForDeploymentStatistics()
        {
            identityService.setAuthentication("user", null, Arrays.asList(TENANT_ONE));

            DeploymentStatisticsQuery query = managementService.createDeploymentStatisticsQuery();

            assertThat(query.count(), @is(2L));

            ISet <string> tenantIds = collectDeploymentTenantIds(query.list());

            assertThat(tenantIds.Count, @is(2));
            assertThat(tenantIds, hasItems(null, TENANT_ONE));
        }
Exemplo n.º 3
0
        public virtual void testQueryDisabledTenantCheckForDeploymentStatistics()
        {
            processEngineConfiguration.TenantCheckEnabled = false;
            identityService.setAuthentication("user", null, null);

            DeploymentStatisticsQuery query = managementService.createDeploymentStatisticsQuery();

            assertThat(query.count(), @is(3L));

            ISet <string> tenantIds = collectDeploymentTenantIds(query.list());

            assertThat(tenantIds.Count, @is(3));
            assertThat(tenantIds, hasItems(null, TENANT_ONE, TENANT_TWO));
        }