Source:
<code>public void testSearchOperations() throws ApiException { final ApiClient webClient = getWebClient(USER_2_USERNAME, testingPostgres); ExtendedGa4GhApi extendedGa4GhApi = new ExtendedGa4GhApi(webClient); extendedGa4GhApi.toolsIndexGet(); waitForRefresh(5000); waitForRefresh(5000); WorkflowsApi workflowApi = new WorkflowsApi(webClient); workflowApi.manualRegister("github", "DockstoreTestUser2/dockstore_workflow_cnv", "/workflow/cnv.cwl", "", "cwl", "/test.json"); final Workflow workflowByPathGithub = workflowApi .getWorkflowByPath(WorkflowIT.DOCKSTORE_TEST_USER2_RELATIVE_IMPORTS_WORKFLOW, null, false); final Workflow workflow = workflowApi.refresh(workflowByPathGithub.getId()); workflowApi.publish(workflow.getId(), SwaggerUtility.createPublishRequest(false)); waitForRefresh(1500); String exampleESQuery = "{\"size\":201,\"_source\":{\"excludes\":[\"*.content\",\"*.sourceFiles\",\"description\",\"users\",\"workflowVersions.dirtyBit\",\"workflowVersions.hidden\",\"workflowVersions.last_modified\",\"workflowVersions.name\",\"workflowVersions.valid\",\"workflowVersions.workflow_path\",\"workflowVersions.workingDirectory\",\"workflowVersions.reference\"]},\"query\":{\"match_all\":{}}}"; workflowApi.publish(workflow.getId(), SwaggerUtility.createPublishRequest(false)); waitForRefresh(1500); String s = extendedGa4GhApi.toolsIndexSearch(exampleESQuery); <START> assertTrue(s.contains("\"aliases\":{}")); <END> assertFalse(s.contains("\"aliases\":null")); assertTrue(s.contains(WorkflowIT.DOCKSTORE_TEST_USER2_RELATIVE_IMPORTS_WORKFLOW)); }</code><technical_language>close, add actual alias workflow waitForRefresh shows</technical_language>

Target:
public void testSearchOperations() throws ApiException { final ApiClient webClient = getWebClient(USER_2_USERNAME, testingPostgres); ExtendedGa4GhApi extendedGa4GhApi = new ExtendedGa4GhApi(webClient); EntriesApi entriesApi = new EntriesApi(webClient); extendedGa4GhApi.toolsIndexGet(); waitForRefresh(5000); waitForRefresh(5000); WorkflowsApi workflowApi = new WorkflowsApi(webClient); workflowApi.manualRegister("github", "DockstoreTestUser2/dockstore_workflow_cnv", "/workflow/cnv.cwl", "", "cwl", "/test.json"); final Workflow workflowByPathGithub = workflowApi .getWorkflowByPath(WorkflowIT.DOCKSTORE_TEST_USER2_RELATIVE_IMPORTS_WORKFLOW, null, false); final Workflow workflow = workflowApi.refresh(workflowByPathGithub.getId()); entriesApi.addAliases(workflow.getId(), "potatoAlias"); workflowApi.publish(workflow.getId(), SwaggerUtility.createPublishRequest(false)); waitForRefresh(1500); String exampleESQuery = "{\"size\":201,\"_source\":{\"excludes\":[\"*.content\",\"*.sourceFiles\",\"description\",\"users\",\"workflowVersions.dirtyBit\",\"workflowVersions.hidden\",\"workflowVersions.last_modified\",\"workflowVersions.name\",\"workflowVersions.valid\",\"workflowVersions.workflow_path\",\"workflowVersions.workingDirectory\",\"workflowVersions.reference\"]},\"query\":{\"match_all\":{}}}"; workflowApi.publish(workflow.getId(), SwaggerUtility.createPublishRequest(true)); waitForRefresh(1500); String s = extendedGa4GhApi.toolsIndexSearch(exampleESQuery); assertTrue(s.contains("\"aliases\":{\"potatoAlias\":{}}")); assertTrue(s.contains("\"aliases\":{}")); assertFalse(s.contains("\"aliases\":null")); assertTrue(s.contains(WorkflowIT.DOCKSTORE_TEST_USER2_RELATIVE_IMPORTS_WORKFLOW)); }