public async Task CancelRunNotExist() { var task = await _tasksApi.CreateTaskEvery(GenerateName("it task"), TaskFlux, "1s", _organization); Thread.Sleep(5_000); var runs = await _tasksApi.GetRuns(task, null, null, 1); Assert.IsNotEmpty(runs); var message = Assert.ThrowsAsync <HttpException>(async() => await _tasksApi.CancelRun(runs[0])) .ErrorBody["error"]["message"].ToString(); Assert.AreEqual(message, "run not found"); }
public async Task CancelRunNotExist() { var task = await _tasksApi.CreateTaskEvery(GenerateName("it task"), TaskFlux, "1s", _organization); Thread.Sleep(5_000); var runs = await _tasksApi.GetRuns(task, null, null, 1); Assert.IsNotEmpty(runs); var message = Assert.ThrowsAsync <HttpException>(async() => await _tasksApi.CancelRun(runs[0])) .Message; Assert.AreEqual("failed to cancel run: run not found", message); }