MCPcopy Create free account
hub / github.com/UiPath/uipathcli / CreateTestSet

Method CreateTestSet

utils/api/orchestrator_client.go:295–314  ·  view source on GitHub ↗
(folderId int, releaseId int, processVersion string)

Source from the content-addressed store, hash-verified

293}
294
295func (c OrchestratorClient) CreateTestSet(folderId int, releaseId int, processVersion string) (int, error) {
296 request, err := c.createTestSetRequest(folderId, releaseId, processVersion)
297 if err != nil {
298 return -1, err
299 }
300 client := network.NewHttpClient(c.logger, c.httpClientSettings())
301 response, err := client.Send(request)
302 if err != nil {
303 return -1, err
304 }
305 defer func() { _ = response.Body.Close() }()
306 body, err := io.ReadAll(response.Body)
307 if err != nil {
308 return -1, fmt.Errorf("Error reading response: %w", err)
309 }
310 if response.StatusCode != http.StatusCreated {
311 return -1, fmt.Errorf("Orchestrator returned status code '%v' and body '%v'", response.StatusCode, string(body))
312 }
313 return strconv.Atoi(string(body))
314}
315
316func (c OrchestratorClient) createTestSetRequest(folderId int, releaseId int, processVersion string) (*network.HttpRequest, error) {
317 json, err := json.Marshal(createTestSetRequestJson{

Callers 1

runTestsMethod · 0.95

Calls 5

createTestSetRequestMethod · 0.95
httpClientSettingsMethod · 0.95
SendMethod · 0.95
NewHttpClientFunction · 0.92
CloseMethod · 0.80

Tested by

no test coverage detected