assertResponse(WARNING, thrift.rewriteConfigs(request, SESSION));
}
@Test
public void testRewriteShard() throws Exception {
TaskConfig storedConfig = productionTask();
ITaskConfig modifiedConfig = ITaskConfig.build(
storedConfig.deepCopy().setExecutorConfig(new ExecutorConfig("aurora", "rewritten")));
String taskId = "task_id";
IScheduledTask storedTask = IScheduledTask.build(new ScheduledTask().setAssignedTask(
new AssignedTask()
.setTaskId(taskId)
.setTask(storedConfig)));
InstanceKey instanceKey = new InstanceKey(
JobKeys.from(
storedConfig.getOwner().getRole(),
storedConfig.getEnvironment(),
storedConfig.getJobName()).newBuilder(),
0);
expectAuth(ROOT, true);
storageUtil.expectTaskFetch(
Query.instanceScoped(IInstanceKey.build(instanceKey)).active(), storedTask);