protected BuildResponse GetBuildEngineBuild(Product product) { if (!SetBuildEngineEndpoint(product.Project.Organization)) { return(null); } var buildResponse = BuildEngineApi.GetBuild(product.WorkflowJobId, product.WorkflowBuildId); return(buildResponse); }
public void GetTestBuild(int jobId, int buildId) { var client = new BuildEngineApi(BaseUrl, ApiAccessKey); var response = client.GetBuild(jobId, buildId); Assert.NotNull(response); Assert.Equal(buildId, response.Id); Assert.Equal(jobId, response.JobId); Assert.Equal("SUCCESS", response.Result); Assert.Equal("completed", response.Status); Assert.Null(response.Error); Assert.Equal(7, response.Artifacts.Count); Assert.True(response.Artifacts.ContainsKey("apk")); Assert.True(response.Artifacts.ContainsKey("about")); Assert.True(response.Artifacts.ContainsKey("play-listing")); Assert.True(response.Artifacts.ContainsKey("version_code")); Assert.True(response.Artifacts.ContainsKey("package_name")); Assert.True(response.Artifacts.ContainsKey("cloudWatch")); Assert.True(response.Artifacts.ContainsKey("consoleText")); Assert.Contains("about.txt", response.Artifacts["about"]); Assert.Contains("index.html", response.Artifacts["play-listing"]); Assert.Contains("version_code.txt", response.Artifacts["version_code"]); Assert.Contains("package_name.txt", response.Artifacts["package_name"]); }