id int64 | repo string | class_path string | test_method_name string | source_code string | EagerTest int64 | MysteryGuest int64 | ResourceOptimism int64 | TestRedundancy int64 |
|---|---|---|---|---|---|---|---|---|
4,748 | admiral | com.vmware.admiral.adapter.docker.service.containerstatemappertest | testcomparerunningcontainerinusernetworkwithdefaultpropertiesandmatchedcontainerstateshouldpass | public void testCompareRunningContainerInUserNetworkWithDefaultPropertiesAndMatchedContainerStateShouldPass() {
String networkName = "test-network";
String ipv4 = "172.100.0.100";
predefinedState.networks.put(networkName,
createServiceNetwork(networkName, ipv4));
add... | 0 | 0 | 0 | 0 |
4,646 | admiral | com.vmware.admiral.adapter.docker.service.dockeradapterservicetest | testcreatedcontainershouldbeinspectedonnetworkoperationfailure | public void testCreatedContainerShouldBeInspectedOnNetworkOperationFailure() throws Throwable {
removeContainer();
createContainerState();
ServiceNetwork network = new ServiceNetwork();
network.name = "network";
ContainerState patch = new Container... | 0 | 0 | 0 | 0 |
4,638 | admiral | com.vmware.admiral.adapter.docker.service.dockeradapterservicetest | testdeletewithretry | public void testDeleteWithRetry() throws Throwable {
verifyContainerIsRunning(true);
assertEquals("Unexpected PowerState in ContainerState",
PowerState.RUNNING, containerState.powerState);
tearDownMockDockerHost();
sendDeleteContainerRequest();
... | 0 | 0 | 0 | 0 |
4,642 | admiral | com.vmware.admiral.adapter.docker.service.dockeradapterservicetest | testinspectcontainer | public void testInspectContainer() throws Throwable {
sendInspectContainerRequest();
waitForPropertyValue(provisioningTaskLink, MockTaskState.class, "taskInfo.stage",
TaskState.TaskStage.FINISHED);
}
| 0 | 0 | 0 | 0 |
4,643 | admiral | com.vmware.admiral.adapter.docker.service.dockeradapterservicetest | testinspectcontainerwithretry | public void testInspectContainerWithRetry() throws Throwable {
verifyContainerIsRunning(true);
assertEquals("Unexpected PowerState in ContainerState",
PowerState.RUNNING, containerState.powerState);
tearDownMockDockerHost();
sendInspectContainerReq... | 0 | 0 | 0 | 0 |
4,644 | admiral | com.vmware.admiral.adapter.docker.service.dockeradapterservicetest | teststatsdisabledwhencontainerstopped | public void testStatsDisabledWhenContainerStopped() throws Throwable {
sendFetchContainerStatsRequest();
waitForPropertyValue(provisioningTaskLink, MockTaskState.class, "taskInfo.stage",
TaskState.TaskStage.FINISHED);
sendStopContainerRequest();
... | 0 | 0 | 0 | 0 |
4,719 | admiral | com.vmware.admiral.adapter.docker.service.dockerhostadapterservicetest | testhostpermanentlynotavailable | public void testHostPermanentlyNotAvailable() throws Throwable {
ComputeState state = new ComputeState();
state.powerState = PowerState.SUSPEND;
Map<String, String> properties = new HashMap<>();
properties.put(ContainerHostService.RETRIES_COUNT_PROP_NAME, "2");
state.customPr... | 1 | 0 | 0 | 0 |
4,711 | admiral | com.vmware.admiral.adapter.docker.service.dockerhostadapterservicetest | testhostpingwithresourcereference | public void testHostPingWithResourceReference() throws Throwable {
dockerHostState = requestDockerHostOperation(MockDockerPathConstants._PING,
ContainerHostOperationType.PING);
}
| 0 | 0 | 0 | 0 |
4,723 | admiral | com.vmware.admiral.adapter.docker.service.dockerhostadapterservicetest | testlistcontainerswithcallback | public void testListContainersWithCallBack() throws Throwable {
host.log(Level.INFO, "Started listing containers with callback.");
assertListedEntitiesCount(0, ContainerHostOperationType.LIST_CONTAINERS, new ContainerItem());
createEntity(MockDockerCreateContainerS... | 0 | 0 | 0 | 0 |
4,721 | admiral | com.vmware.admiral.adapter.docker.service.dockerhostadapterservicetest | testlistvolumeswithcallback | public void testListVolumesWithCallBack() throws Throwable {
host.log(Level.INFO, "Started listing volumes with callback.");
assertListedEntitiesCount(0, ContainerHostOperationType.LIST_VOLUMES, new VolumeItem());
createEntity(MockDockerCreateVolumeService.SELF_LIN... | 0 | 0 | 0 | 0 |
4,693 | admiral | com.vmware.admiral.adapter.docker.service.dockernetworkadapterservicetest | testnetworkinspect | public void testNetworkInspect() throws Throwable {
while ((MockDockerNetworkService.networksMap == null
|| MockDockerNetworkService.networksMap.isEmpty())
&& NETWORK_LIST_RETRY_COUNT > 0) {
Thread.sleep(TIME_BETWEEN_RETRIES_IN_MILSEC);
NETWOR... | 1 | 0 | 0 | 0 |
4,739 | admiral | com.vmware.admiral.adapter.docker.service.systemimageretrievalmanagertest | testgetfromuserresources | public void testGetFromUserResources() throws Throwable {
Path testXenonImagesPath = Files.createTempDirectory("test-xenon-images");
HostInitCommonServiceConfig.startServices(host);
waitForServiceAvailability(ConfigurationFactoryService.SELF_LINK);
waitForServiceAvailability(UriUtil... | 1 | 1 | 1 | 0 |
4,616 | admiral | com.vmware.admiral.adapter.docker.util.dockeradapterutilstest | testfiltervolumebindings | public void testFilterVolumeBindings() {
List<String> bindings = DockerAdapterUtils.filterVolumeBindings(null);
assertEquals(Collections.emptyList(), bindings);
String[] volumes = new String[] {};
bindings = DockerAdapterUtils.filterVolumeBindings(volumes);
assertEquals(Coll... | 0 | 0 | 0 | 0 |
4,622 | admiral | com.vmware.admiral.adapter.docker.util.dockerdevicetest | testconversions | public void testConversions() {
DockerDevice device = DockerDevice.fromString(fullDeviceString);
verifyDevice("fromString: " + description, device);
Map<String, String> map = device.toMap();
verifyMap("toMap: " + description, map);
device = Docke... | 0 | 0 | 0 | 0 |
4,605 | admiral | com.vmware.admiral.adapter.docker.util.dockerportmappingtest | testdockerportstringparsing | public void testDockerPortStringParsing() {
DockerPortMapping portMapping = DockerPortMapping.fromString(fullPortString);
assertEquals(description + ": hostIp", expectedHostIp, portMapping.getHostIp());
assertEquals(description + ": hostPort", expectedHostPort, portMapping.getHostPort());
... | 0 | 0 | 0 | 0 |
4,495 | admiral | com.vmware.admiral.adapter.kubernetes.apiutiltest | testbuildapiserverproxyurl | public void testBuildApiServerProxyUrl() {
String apiVersionPrefix = "/api/v1";
String namespace = "test-namespace";
String selfLink = "/services/test";
String proxiedPath = "/test-path";
String expected = context.host.address
+ "/api/v1/namespaces/test-names... | 0 | 0 | 0 | 0 |
4,540 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetesadapterservicetest | testdelete | public void testDelete() throws Throwable {
PodState podState = new PodState();
podState.pod = new Pod();
podState.pod.spec = new PodSpec();
podState.pod.spec.containers = new ArrayList<>();
Container container1 = new Container();
container1.name = "container1";
... | 0 | 0 | 0 | 0 |
4,538 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetesadapterservicetest | testfetchlogs | public void testFetchLogs() throws Throwable {
service.containerNamesToLogs.put("container1", "test-log-1");
service.containerNamesToLogs.put("container2", "test-log-2");
service.containerNamesToLogs.put("container3", "test-log-3");
PodState podState = new PodState();
podSta... | 0 | 0 | 0 | 0 |
4,539 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetesadapterservicetest | testinspect | public void testInspect() throws Throwable {
PodState podState = new PodState();
podState.pod = new Pod();
podState.pod.spec = new PodSpec();
podState.pod.spec.containers = new ArrayList<>();
Container container1 = new Container();
container1.name = "container1";
... | 0 | 0 | 0 | 0 |
4,543 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetesapplicationadapterservicetest | testvalidateservicesaredeployedfirst | public void testValidateServicesAreDeployedFirst() throws Throwable {
String wordpressTemplate = CommonTestStateFactory
.getFileContent("WordPress_with_MySQL_kubernetes.yaml");
String compositeDescriptionLink = importTemplate(wordpressTemplate);
CompositeDescription composi... | 1 | 1 | 1 | 0 |
4,512 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testcorrectdateparse | public void TestCorrectDateParse() {
KubernetesContainerStateMapper.parseDate("2017-01-09T10:43:32Z");
}
| 0 | 0 | 0 | 0 |
4,502 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testcorrectenvmap | public void TestCorrectEnvMap() {
EnvVar e = new EnvVar();
e.name = "name";
e.value = "val";
String env = KubernetesContainerStateMapper.makeEnv(e);
Assert.assertEquals(e.name + "=" + e.value, env);
}
| 0 | 0 | 0 | 0 |
4,524 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testcorrectparsememm | public void TestCorrectParseMemM() {
long r = KubernetesContainerStateMapper.parseMem("4M");
Assert.assertEquals(4_000_000L, r);
}
| 0 | 0 | 0 | 0 |
4,528 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testcorrectparsememt | public void TestCorrectParseMemT() {
long r = KubernetesContainerStateMapper.parseMem("4T");
Assert.assertEquals(4_000_000_000_000L, r);
}
| 0 | 0 | 0 | 0 |
4,501 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testgetidwithoutprefix | public void TestGetIdWithoutPrefix() {
String inID = "some-random-id";
String id = KubernetesContainerStateMapper.getId(inID);
Assert.assertEquals(inID, id);
}
| 0 | 0 | 0 | 0 |
4,509 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testgetpowerstatestopped | public void TestGetPowerStateStopped() {
ContainerStatus status = new ContainerStatus();
status.state = new com.vmware.admiral.compute.kubernetes.entities.pods.ContainerState();
status.state.terminated = new ContainerStateTerminated();
PowerState state = KubernetesContainerStateMappe... | 0 | 0 | 0 | 0 |
4,518 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testinvalidparsecpu | public void TestInvalidParseCPU() {
float r = KubernetesContainerStateMapper.parseCPU("m933m");
Assert.assertEquals(0F, r, 1e-6F);
}
| 0 | 0 | 0 | 0 |
4,505 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testmapcontainerwithnullinputcontainer | public void TestMapContainerWithNullInputContainer() {
ContainerState outState = new ContainerState();
ContainerStatus status = new ContainerStatus();
status.containerID = "docker:
KubernetesContainerStateMapper.mapContainer(outState, null, status);
Assert.assertNull... | 0 | 0 | 0 | 0 |
4,533 | admiral | com.vmware.admiral.adapter.kubernetes.service.kubernetescontainerstatemappertest | testparsememwithemptystring | public void TestParseMemWithEmptyString() {
long r = KubernetesContainerStateMapper.parseMem("");
Assert.assertEquals(0L, r);
}
| 0 | 0 | 0 | 0 |
4,557 | admiral | com.vmware.admiral.adapter.pks.pkscontexttest | testnulluri | public void testNullURI() {
endpoint.uaaEndpoint = null;
PKSContext.create(endpoint, uaaTokenResponse);
}
| 0 | 0 | 0 | 0 |
4,568 | admiral | com.vmware.admiral.adapter.pks.pksremoteclientservicetest | testcreateuser | public void testCreateUser() throws Throwable {
PKSRemoteClientService client = new PKSRemoteClientService(null, host);
assertNotNull(client);
PKSContext ctx = new PKSContext();
ctx.pksAPIUri = URI.create("http:
ServiceClient mockClient = mockClient(client);
Argumen... | 1 | 0 | 0 | 0 |
4,566 | admiral | com.vmware.admiral.adapter.pks.pksremoteclientservicetest | testgetcluster | public void testGetClusters() throws Throwable {
PKSRemoteClientService client = new PKSRemoteClientService(null, host);
assertNotNull(client);
PKSContext ctx = new PKSContext();
ctx.pksAPIUri = URI.create("http:
ServiceClient mockClient = mockClient(client);
Argume... | 1 | 0 | 0 | 0 |
4,567 | admiral | com.vmware.admiral.adapter.pks.pksremoteclientservicetest | testgetplans | public void testGetPlans() throws Throwable {
PKSRemoteClientService client = new PKSRemoteClientService(null, host);
assertNotNull(client);
PKSContext ctx = new PKSContext();
ctx.pksAPIUri = URI.create("http:
ServiceClient mockClient = mockClient(client);
ArgumentC... | 1 | 0 | 0 | 0 |
4,583 | admiral | com.vmware.admiral.adapter.pks.service.kubeconfigcontentservicetest | testgetkubeconfigwithbearertoken | public void testGetKubeConfigWithBearerToken() throws Throwable {
String authCredentialsLink = createCredentials(AuthCredentialsType.Bearer, true)
.documentSelfLink;
String hostLink = createCompute(authCredentialsLink, true, true).documentSelfLink;
URI serviceUri = UriUtils.... | 0 | 0 | 0 | 0 |
4,584 | admiral | com.vmware.admiral.adapter.pks.service.kubeconfigcontentservicetest | testgetkubeconfigwithcertificateandkey | public void testGetKubeConfigWithCertificateAndKey() throws Throwable {
assertTrue(UUID.randomUUID().toString().matches("[-a-z0-9]+"));
String authCredentialsLink = createCredentials(AuthCredentialsType.PublicKey, false)
.documentSelfLink;
String hostLink = createCompute(auth... | 0 | 0 | 0 | 0 |
4,587 | admiral | com.vmware.admiral.adapter.pks.service.kubeconfigcontentservicetest | testshouldfailwhenhostlinkparamismissing | public void testShouldFailWhenHostLinkParamIsMissing() throws Throwable {
URI serviceUri = UriUtils.buildUri(host, KubeConfigContentService.SELF_LINK);
try {
doOperation(null, serviceUri, true, Action.GET);
fail("Operation should have failed: hostLink query param not set");
... | 0 | 0 | 0 | 0 |
4,593 | admiral | com.vmware.admiral.adapter.pks.service.pksclusterconfigservicetest | testaddpksclusterfail | public void testAddPKSClusterFail() {
String endpointLink = createEndpoint().documentSelfLink;
AddClusterRequest request = new AddClusterRequest();
request.endpointLink = endpointLink;
Operation o = Operation
.createPost(host, PKSClusterConfigService.SELF_LINK)
... | 0 | 0 | 0 | 0 |
4,578 | admiral | com.vmware.admiral.adapter.pks.service.pksclusterlistservicetest | testgetpkscluster | public void testGetPKSCluster() {
String endpoint = createEndpoint().documentSelfLink;
List<PKSCluster> clusters = sendListRequest(endpoint,
MockPKSAdapterService.CLUSTER_NAME_CREATE_SUCCESS, false);
assertNotNull(clusters);
assertEquals(1, clusters.size());
... | 0 | 0 | 0 | 0 |
4,473 | admiral | com.vmware.admiral.adapter.registry.service.registryadapterservicetest | testduplicateregistryinsideprojectshouldfail | public void testDuplicateRegistryInsideProjectShouldFail() throws Throwable {
RegistryState registryState = new RegistryState();
registryState.address = "http:
registryState.name = "TestRegistry";
registryState.tenantLinks = new ArrayList<>();
registryState.tenantLinks.add("t... | 0 | 0 | 0 | 0 |
4,477 | admiral | com.vmware.admiral.adapter.registry.service.registryadapterservicetest | testsameregistrytwodifferentprojectsnotremoveoldtenantlinkshouldfail | public void testSameRegistryTwoDifferentProjectsNotRemoveOldTenantLinkShouldFail() throws
Throwable {
RegistryState registryState = new RegistryState();
registryState.address = "http:
registryState.name = "TestRegistry";
registryState.tenantLinks = new ArrayList<>();
... | 0 | 0 | 0 | 0 |
4,476 | admiral | com.vmware.admiral.adapter.registry.service.registryadapterservicetest | testsameregistrytwodifferentprojectsremoveoldtenantlink | public void testSameRegistryTwoDifferentProjectsRemoveOldTenantLink() throws Throwable {
RegistryState registryState = new RegistryState();
registryState.address = "http:
registryState.name = "TestRegistry";
registryState.tenantLinks = new ArrayList<>();
registryState.tenant... | 0 | 0 | 0 | 0 |
4,481 | admiral | com.vmware.admiral.adapter.registry.service.registryadapterservicetest | testv2listimagetags | public void testV2ListImageTags() throws Throwable {
URI v2RegistryStateUri = UriUtils.buildUri(host, v2RegistryStateLink);
sendRegistryListTagsRequest(v2RegistryStateUri, "v2registry.test/vmware/admiral", (Operation op) -> {
String[] tags = op.getBody(String[].class);
asser... | 0 | 0 | 0 | 0 |
3,538 | admiral | com.vmware.admiral.auth.authinitialbootservicetest | testdefaultprojectcreatedonstartup | public void testDefaultProjectCreatedOnStartUp() throws Throwable {
waitForServiceAvailability(ProjectService.DEFAULT_PROJECT_LINK);
ProjectState project = getDocument(ProjectState.class,
ProjectService.DEFAULT_PROJECT_LINK);
assertNotNull(project);
assertEquals(Pro... | 0 | 1 | 1 | 0 |
3,533 | admiral | com.vmware.admiral.auth.content.authcontentservicetest | testimportcontentwithprojectandusers | public void testImportContentWithProjectAndUsers() throws Throwable {
AuthContentBody body = Utils.fromJson(authContent, AuthContentBody.class);
loadAuthContent(body);
List<String> projectLinks = getDocumentLinksOfType(ProjectState.class);
projectLinks.remove(ProjectService.DEFAULT_... | 1 | 1 | 1 | 0 |
3,510 | admiral | com.vmware.admiral.auth.idm.local.localprincipalprovidertest | testgetprincipal | public void testGetPrincipal() {
String principalId = "connie@admiral.com";
DeferredResult<Principal> result = provider.getPrincipal(null, principalId);
TestContext ctx = testCreate(1);
result.whenComplete((p, ex) -> {
if (ex != null) {
ctx.failIteration(... | 0 | 0 | 0 | 0 |
3,513 | admiral | com.vmware.admiral.auth.idm.local.localprincipalprovidertest | testgetprincipals | public void testGetPrincipalsOfTypeGroup() {
String principalId = "superusers@admiral.com";
DeferredResult<List<Principal>> result = provider.getPrincipals(null, principalId);
TestContext ctx = testCreate(1);
result.whenComplete((p, ex) -> {
if (ex != null) {
... | 1 | 0 | 0 | 0 |
3,511 | admiral | com.vmware.admiral.auth.idm.local.localprincipalprovidertest | testgetprincipalsoftypegroup | public void testGetPrincipalsOfTypeGroup() {
String principalId = "superusers@admiral.com";
DeferredResult<List<Principal>> result = provider.getPrincipals(null, principalId);
TestContext ctx = testCreate(1);
result.whenComplete((p, ex) -> {
if (ex != null) {
... | 0 | 0 | 0 | 0 |
3,525 | admiral | com.vmware.admiral.auth.idm.local.localprincipalservicetest | testdeleteprincipalshoulddeleteuserstate | public void testDeletePrincipalShouldDeleteUserState() throws Throwable {
String fritzEmail = "fritz@admiral.com";
String fritzSelfLink = LocalPrincipalFactoryService.SELF_LINK + "/" + encode(fritzEmail);
doDelete(UriUtils.buildUri(host, fritzSelfLink), false);
LocalPrincipalState ... | 0 | 1 | 1 | 0 |
3,523 | admiral | com.vmware.admiral.auth.idm.local.localprincipalservicetest | testuserspecificresourcearecreatedwhenuseriscreated | public void testUserSpecificResourceAreCreatedWhenUserIsCreated() throws Throwable {
String fritzEmail = "fritz@admiral.com";
String fritzSelfLink = LocalPrincipalFactoryService.SELF_LINK + "/" + encode(fritzEmail);
LocalPrincipalState state = getDocumentNoWait(LocalPrincipalState.... | 0 | 1 | 1 | 0 |
3,508 | admiral | com.vmware.admiral.auth.idm.localauthconfigprovidertest | testinitconfig | public void testInitConfig() {
AuthConfigProvider provider = new LocalAuthConfigProvider();
assertNull(provider.getAuthenticationService());
assertEquals(BasicAuthenticationService.SELF_LINK,
provider.getAuthenticationServiceSelfLink());
Function<Claims, String> use... | 0 | 0 | 0 | 0 |
3,499 | admiral | com.vmware.admiral.auth.idm.principalroleshandlertest | testassignroletousergroup | public void testAssignRoleToUserGroup() throws Throwable {
PrincipalRoleAssignment roleAssignment = new PrincipalRoleAssignment();
roleAssignment.add = new ArrayList<>();
roleAssignment.add.add(AuthRole.CLOUD_ADMIN.name());
doRoleAssignment(roleAssignment, USER_GROUP_DEVELOPERS);
... | 0 | 1 | 1 | 0 |
3,498 | admiral | com.vmware.admiral.auth.idm.principalroleshandlertest | testassignroletousertwice | public void testAssignRoleToUserTwice() throws Throwable {
PrincipalRoleAssignment roleAssignment = new PrincipalRoleAssignment();
roleAssignment.add = new ArrayList<>();
roleAssignment.add.add(AuthRole.CLOUD_ADMIN.name());
doRoleAssignment(roleAssignment, USER_EMAIL_BASIC_... | 0 | 1 | 0 | 0 |
3,486 | admiral | com.vmware.admiral.auth.idm.principalservicetest | testgetallrolesforprincipalwithindirectroles | public void testGetAllRolesForPrincipalWithIndirectRoles() throws Throwable {
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2));
LocalPrincipalState root = new LocalPrincipalState();
root.type = LocalPrincipalType.GROUP;
root.n... | 1 | 1 | 0 | 0 |
3,489 | admiral | com.vmware.admiral.auth.idm.principalservicetest | testgetsecuritycontextwithidandinvalidpassword | public void testGetSecurityContextWithIdAndInvalidPassword() {
SecurityContextPostDto dto = new SecurityContextPostDto();
dto.password = "invalid";
TestContext ctx = testCreate(1);
Operation post = Operation
.createPost(host, UriUtils.buildUriPath(PrincipalService.SE... | 0 | 0 | 0 | 0 |
3,494 | admiral | com.vmware.admiral.auth.idm.principalservicetest | testprincipalrolehashcodeequals | public void testPrincipalRoleHashCodeEquals() {
PrincipalRoles pr1 = new PrincipalRoles();
PrincipalRoles pr2 = new PrincipalRoles();
assertEquals(31, pr1.hashCode());
assertFalse(pr1.equals(null));
assertFalse(pr1.equals(this));
assertTrue(pr1.equals(pr2));
... | 0 | 0 | 0 | 0 |
3,541 | admiral | com.vmware.admiral.auth.project.projectfactoryservicetest | testgetpublicprojectonly | public void testGetPublicProjectOnly() throws Throwable {
ProjectState testProject1 = createProject("test-project1", "test", true);
ProjectState testProject2 = createProject("test-project2", "test", true);
ProjectState testProject3 = createProject("test-project3", "test", false);
Pro... | 0 | 1 | 0 | 0 |
3,543 | admiral | com.vmware.admiral.auth.project.projectfactoryservicetest | testgetstatewithfilter | public void testGetStateWithFilter() {
URI uriWithFilter = UriUtils.extendUriWithQuery(
UriUtils.buildUri(host, ProjectFactoryService.SELF_LINK),
UriUtils.URI_PARAM_ODATA_FILTER, String.format("%s eq '%s'",
ServiceDocument.FIELD_NAME_SELF_LINK, project... | 0 | 0 | 0 | 0 |
3,540 | admiral | com.vmware.admiral.auth.project.projectfactoryservicetest | testgetstatewithmembers | public void testGetStateWithMembers() {
URI uriWithExpand = UriUtils.extendUriWithQuery(
UriUtils.buildUri(host, ProjectFactoryService.SELF_LINK),
UriUtils.URI_PARAM_ODATA_EXPAND, Boolean.toString(true),
UriUtils.URI_PARAM_ODATA_FILTER, String.format("%s eq '%... | 0 | 0 | 0 | 0 |
3,548 | admiral | com.vmware.admiral.auth.project.projectroleshandlertest | testassignnotexistingprincipalgroupshouldfail | public void testAssignNotExistingPrincipalGroupShouldFail() {
ProjectRoles projectRoles = new ProjectRoles();
projectRoles.members = new PrincipalRoleAssignment();
projectRoles.administrators = new PrincipalRoleAssignment();
projectRoles.administrators.add = Collections.singletonList... | 0 | 0 | 0 | 0 |
3,551 | admiral | com.vmware.admiral.auth.project.projectroleshandlertest | testassignprincipaloftypegrouptwice | public void testAssignPrincipalOfTypeGroupTwice() {
String groupId = "superusers@admiral.com";
ProjectRoles projectRoles = new ProjectRoles();
projectRoles.members = new PrincipalRoleAssignment();
projectRoles.members.add = Collections.singletonList(groupId);
String project... | 0 | 0 | 0 | 0 |
3,590 | admiral | com.vmware.admiral.auth.project.projectservicetest | createresourcepool | ResourcePoolState pool = createResourcePool();
GroupResourcePlacementState placement = new GroupResourcePlacementState();
| 0 | 0 | 0 | 0 |
3,577 | admiral | com.vmware.admiral.auth.project.projectservicetest | testcreateprojectwithduplicatenameshouldfail | public void testCreateProjectWithDuplicateNameShouldFail() throws Throwable {
createProject("test-name");
try {
createProjectExpectFailure("test-name");
fail("Project create with same name should've failed");
} catch (Exception ex) {
assertTrue(ex instanc... | 0 | 0 | 0 | 0 |
3,576 | admiral | com.vmware.admiral.auth.project.projectservicetest | testdefaultprojectusergroupsarecreated | public void testDefaultProjectUserGroupsAreCreated() throws Throwable {
ProjectState defaultProject = getDocumentNoWait(ProjectState.class,
ProjectService.DEFAULT_PROJECT_LINK);
assertNotNull(defaultProject);
assertNotNull(defaultProject.documentSelfLink);
assertNotN... | 0 | 0 | 0 | 0 |
3,564 | admiral | com.vmware.admiral.auth.project.projectservicetest | testdelete | public void testDelete() throws Throwable {
String admins = project.administratorsUserGroupLinks.iterator().next();
String members = project.membersUserGroupLinks.iterator().next();
String viewers = project.viewersUserGroupLinks.iterator().next();
deleteProject(project);
... | 0 | 1 | 1 | 0 |
3,566 | admiral | com.vmware.admiral.auth.project.projectservicetest | testdeleteprojectassociatedwithplacement | public void testDeleteProjectAssociatedWithPlacement() throws Throwable {
ResourcePoolState pool = createResourcePool();
GroupResourcePlacementState placement = new GroupResourcePlacementState();
placement.name = "test-reservation";
placement.resourcePoolLink = pool.documentSelfLink;... | 0 | 0 | 0 | 0 |
3,584 | admiral | com.vmware.admiral.auth.project.projectservicetest | testdevopsadmincanassignuserstoproject | public void testDevOpsAdminCanAssignUsersToProject() throws Throwable {
ProjectState project = createProject("project");
ProjectRoles roles = new ProjectRoles();
roles.administrators = new PrincipalRoleAssignment();
roles.administrators.add = Collections.singletonList(USER_EMAIL_BASI... | 0 | 0 | 0 | 0 |
3,563 | admiral | com.vmware.admiral.auth.project.projectservicetest | testprojectrolespatchgroups | public void testProjectRolesPatchGroups() throws Throwable {
ExpandedProjectState expandedState = getExpandedProjectState(project.documentSelfLink);
assertNotNull(expandedState.administratorsUserGroupLinks);
assertNotNull(expandedState.membersUserGroupLinks);
assertNotNull(e... | 1 | 1 | 0 | 0 |
3,553 | admiral | com.vmware.admiral.auth.project.projectservicetest | testprojectservices | public void testProjectServices() throws Throwable {
verifyService(
ProjectFactoryService.class,
ProjectState.class,
(prefix, index) -> {
ProjectState projectState = new ProjectState();
projectState.id = prefix + "id" + ... | 0 | 0 | 0 | 0 |
3,570 | admiral | com.vmware.admiral.auth.project.projectservicetest | testusergroupsautocreatedonprojectcreate | public void testUserGroupsAutoCreatedOnProjectCreate() {
String adminsLinks = UriUtils.buildUriPath(UserGroupService.FACTORY_LINK,
AuthRole.PROJECT_ADMIN
.buildRoleWithSuffix(Service.getId(project.documentSelfLink)));
String membersLinks = UriUtils.buildUriPat... | 0 | 0 | 0 | 0 |
3,604 | admiral | com.vmware.admiral.auth.util.authutiltest | testbuildprojectviewersrole | public void testBuildProjectViewersRole() {
RoleState roleState = buildProjectViewersRole(SAMPLE_PROJECT_ID, SAMPLE_USER_GROUP_LINK,
SAMPLE_RESOURCE_GROUP_LINK);
String id = AuthRole.PROJECT_VIEWER.buildRoleWithSuffix(SAMPLE_PROJECT_ID,
SAMPLE_USER_GROUP_LINK);
... | 0 | 0 | 0 | 0 |
3,608 | admiral | com.vmware.admiral.auth.util.authutiltest | testbuildrolestate | public void testBuildRoleState() {
EnumSet<Action> verbs = EnumSet.of(Action.GET);
RoleState roleState = buildRoleState(SAMPLE_SELF_LINK, SAMPLE_USER_GROUP_LINK,
SAMPLE_RESOURCE_GROUP_LINK, verbs, Policy.ALLOW);
assertEquals(SAMPLE_SELF_LINK, roleState.documentSelfLink);
... | 0 | 0 | 0 | 0 |
3,605 | admiral | com.vmware.admiral.auth.util.authutiltest | testbuildusergroupstate | public void testBuildUserGroupState() {
String testId = "testIdentifier";
String testIdSelfLink = UriUtils.buildUriPath(UserGroupService.FACTORY_LINK, testId);
UserGroupState userGroupState = buildUserGroupState(testId);
assertEquals(testIdSelfLink, userGroupState.documentSelfLink);
... | 0 | 0 | 0 | 0 |
3,610 | admiral | com.vmware.admiral.auth.util.authutiltest | testbuildusersquery | public void testBuildUsersQuery() {
List<String> testUsers = Arrays.asList(
"/users/user1@test.com",
"/users/user2@test.com",
"/users/admi@dev.local");
Query queryForUsers = AuthUtil.buildUsersQuery(testUsers);
List<Query> topLevelC... | 0 | 0 | 0 | 0 |
3,612 | admiral | com.vmware.admiral.auth.util.authutiltest | testextractdatafromrolestateid | public void testExtractDataFromRoleStateId() {
String[] in = new String[] {
"123_abc_project-members", "1234_abc_def_project-admins",
"invalid", "", null
};
String[][] out = new String[][] {
new String[] { "123", "abc", "project-members" },
... | 0 | 0 | 0 | 0 |
3,609 | admiral | com.vmware.admiral.auth.util.authutiltest | testisdevopsadmin | public void testIsDevOpsAdmin() throws Throwable {
Method setAuthCtxMethod = Operation.class.getDeclaredMethod("setAuthorizationContext",
AuthorizationContext.class);
Claims guestClaims = new Claims.Builder().setSubject(GuestUserService.SELF_LINK)
.getResult();
... | 0 | 1 | 1 | 0 |
3,615 | admiral | com.vmware.admiral.auth.util.principalrolesutiltest | testgetallrolesforprincipal | public void testGetAllRolesForPrincipal() throws Throwable {
Operation testOperationByAdmin = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2)));
ProjectState firstProject = createProject("first-project");
ass... | 1 | 0 | 0 | 0 |
3,616 | admiral | com.vmware.admiral.auth.util.principalrolesutiltest | testgetallrolesforprincipalwithindirectroles | public void testGetAllRolesForPrincipalWithIndirectRoles() throws Throwable {
Operation testOperationByAdmin = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2)));
LocalPrincipalState root = new Local... | 1 | 0 | 0 | 0 |
3,617 | admiral | com.vmware.admiral.auth.util.principalrolesutiltest | testgetprincipalrolesforbasicuser | public void testGetPrincipalRolesForBasicUser() throws GeneralSecurityException {
Operation testOperationByAdmin = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2)));
Principal basicUser = getPrincipal(USER_EMAIL_BASIC_USER);
DeferredRes... | 0 | 0 | 0 | 0 |
3,639 | admiral | com.vmware.admiral.auth.util.principalutiltest | testcopyprincipaldata | public void testCopyPrincipalData() {
assertEquals(null, copyPrincipalData(null, new Principal()));
Principal principal = new Principal();
assertEquals(principal, copyPrincipalData(principal, null));
principal = copyPrincipalData(testPrincipal, principal);
assertEquals(test... | 0 | 0 | 0 | 0 |
3,634 | admiral | com.vmware.admiral.auth.util.principalutiltest | testencodedecodevca | public void testEncodeDecodeVca() {
ConfigurationState config = new ConfigurationState();
config.key = ConfigurationUtil.VCA_MODE_PROPERTY;
config.value = Boolean.toString(true);
ConfigurationUtil.initialize(config);
String fritzEmail = "fritz@admiral.com";
String en... | 0 | 0 | 0 | 0 |
3,643 | admiral | com.vmware.admiral.auth.util.securitycontextutiltest | testsecuritycontextcontainsallrolesformultipleprojects | public void testSecurityContextContainsAllRolesForMultipleProjects() throws Throwable {
Operation testOperationByAdmin = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN)));
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2));
... | 1 | 0 | 0 | 0 |
3,644 | admiral | com.vmware.admiral.auth.util.securitycontextutiltest | testsecuritycontextcontainsindirectassignedroles | public void testSecurityContextContainsIndirectAssignedRoles() throws Throwable {
Operation testOperationByBasicUser = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_CONNIE)));
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN2));
... | 1 | 0 | 0 | 0 |
3,641 | admiral | com.vmware.admiral.auth.util.securitycontextutiltest | testsecuritycontextforcloudadminandbasicuser | public void testSecurityContextForCloudAdminAndBasicUser() throws GeneralSecurityException {
Operation testOperationByAdmin = createAuthorizedOperation(
host.assumeIdentity(buildUserServicePath(USER_EMAIL_ADMIN)));
Operation testOperationByBasicUser = createAuthorizedOperation(
... | 0 | 0 | 0 | 0 |
3,623 | admiral | com.vmware.admiral.auth.util.usergroupsupdatertest | testusergroupsupdater | public void testUserGroupsUpdater() throws Throwable {
String userGroupSelfLink = UriUtils.buildUriPath(UserGroupService.FACTORY_LINK, encode("testId"));
Query userGroupQuery = AuthUtil.buildQueryForUsers(userGroupSelfLink);
UserGroupState userGroupState = UserGroupState.Builder
... | 1 | 0 | 0 | 0 |
2,974 | admiral | com.vmware.admiral.closures.closuresjavait | executejavaextsourceasziptest | public void executeJavaExtSourceAsZIPTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
int expectedInVar = 3;
int expectedInVar2 = 4;
int expectedResult = 7;
closureDescState.sourceURL ... | 1 | 1 | 1 | 0 |
2,885 | admiral | com.vmware.admiral.closures.closuresnodejsit | adddefaulttasktest | public void addDefaultTaskTest() throws Exception {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.source = "module.exports = function test(context) {"
+ " var a = 1;"
+ " console.log(\"Hello te... | 0 | 0 | 0 | 0 |
2,888 | admiral | com.vmware.admiral.closures.closuresnodejsit | executejsarrayofnumberparameterstest | public void executeJSArrayOfNumberParametersTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
Integer[] expectedInVar = { 1, 2, 3 };
Integer[] expectedResult = { 2, 3, 4 };
closureDescState.sou... | 1 | 0 | 0 | 0 |
2,887 | admiral | com.vmware.admiral.closures.closuresnodejsit | executejsdependenciestest | public void executeJSDependenciesTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
int expectedInVar = 3;
double expectedResult = 4.0;
closureDescState.source = "var _ = require('lodash');"
... | 1 | 0 | 0 | 0 |
2,899 | admiral | com.vmware.admiral.closures.closuresnodejsit | executejsextsourceaszipnopackagejsonentrypointtest | public void executeJSExtSourceAsZIPNoPackageJsonEntrypointTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.entrypoint = "index.test";
String expectedInVar = "a";
String expecte... | 1 | 0 | 0 | 0 |
2,893 | admiral | com.vmware.admiral.closures.closuresnodejsit | executejsobjectparameterstest | public void executeJSObjectParametersTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
TestObject expectedInVar = new TestObject();
expectedInVar.strTest = "test";
expectedInVar.intTest = 1;
... | 1 | 0 | 0 | 0 |
2,933 | admiral | com.vmware.admiral.closures.closurespowershellit | completefailtimeoutedjsscripttasktest | public void completeFailTimeoutedJSScriptTaskTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.source = "#!/usr/bin/powershell\n"
+ "function test($context)\n"
+... | 1 | 0 | 0 | 0 |
2,926 | admiral | com.vmware.admiral.closures.closurespowershellit | executepowershellbooleanparameterstest | public void executePowershellBooleanParametersTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
String expectedInVar = "True";
boolean expectedResult = false;
closureDescState.source = "functio... | 0 | 0 | 0 | 0 |
2,936 | admiral | com.vmware.admiral.closures.closurespowershellit | executepowershellextsourceasziptest | public void executePowershellExtSourceAsZIPTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
String expectedInVar = "a";
String expectedResult = "ac";
closureDescState.sourceURL = testWebserver... | 0 | 1 | 1 | 0 |
2,921 | admiral | com.vmware.admiral.closures.closurespowershellit | executepowershellhelloworldtest | public void executePowerShellHelloWorldTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.source = "function test($context)\n"
+ "{\n"
+ " Write-Host \"Hello, ... | 0 | 0 | 0 | 0 |
2,940 | admiral | com.vmware.admiral.closures.closurespowershellit | executepythonwithentrypointasziptest | public void executePythonWithEntrypointAsZIPTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.entrypoint = "main.handler";
int expectedInVar = 3;
double expectedResult = 4;
... | 0 | 0 | 0 | 0 |
2,954 | admiral | com.vmware.admiral.closures.closurespythonit | completeorfailoutdatedjsscripttasktest | public void completeOrFailOutdatedJSScriptTaskTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
closureDescState.source = "#!/usr/bin/python\n"
+ "import time\n"
+ "\n"
... | 1 | 0 | 0 | 0 |
2,949 | admiral | com.vmware.admiral.closures.closurespythonit | executepythonarrayofbooleanparameterstest | public void executePythonArrayOfBooleanParametersTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
Boolean[] expectedInVar = { true, true, true };
Boolean[] expectedResult = { false, false, false };
... | 1 | 0 | 0 | 0 |
2,945 | admiral | com.vmware.admiral.closures.closurespythonit | executepythonarrayofnumberparameterstest | public void executePythonArrayOfNumberParametersTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
Integer[] expectedInVar = { 1, 2, 3 };
Integer[] expectedResult = { 2, 3, 4 };
closureDescState... | 1 | 0 | 0 | 0 |
2,958 | admiral | com.vmware.admiral.closures.closurespythonit | executepythonextsourceasziptest | public void executePythonExtSourceAsZIPTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
String expectedInVar = "a";
String expectedOutVar = "b";
String expectedResult = "ac";
closureDe... | 1 | 0 | 0 | 0 |
2,959 | admiral | com.vmware.admiral.closures.closurespythonit | executepythonnonexistingziptest | public void executePythonNonExistingZIPTest() throws Throwable {
ClosureDescription closureDescState = new ClosureDescription();
closureDescState.name = "test";
String expectedInVar = "a";
String expectedOutVar = "b";
String expectedResult = "ac";
closureDe... | 1 | 0 | 0 | 0 |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 5