This commit is contained in:
parent
bf4da6c6ad
commit
fac1a6f8e8
|
@ -447,6 +447,11 @@ public class DataFrameTransformConfig extends AbstractDiffable<DataFrameTransfor
|
|||
return this;
|
||||
}
|
||||
|
||||
Builder setVersion(Version version) {
|
||||
this.transformVersion = version;
|
||||
return this;
|
||||
}
|
||||
|
||||
public DataFrameTransformConfig build() {
|
||||
return new DataFrameTransformConfig(id,
|
||||
source,
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
package org.elasticsearch.xpack.core.dataframe.transforms;
|
||||
|
||||
import org.elasticsearch.ElasticsearchStatusException;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.Nullable;
|
||||
import org.elasticsearch.common.Strings;
|
||||
import org.elasticsearch.common.io.stream.StreamInput;
|
||||
|
@ -248,6 +249,7 @@ public class DataFrameTransformConfigUpdate implements Writeable, ToXContentObje
|
|||
if (headers != null) {
|
||||
builder.setHeaders(headers);
|
||||
}
|
||||
builder.setVersion(Version.CURRENT);
|
||||
return builder.build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ public class DataFrameTransformConfigUpdateTests extends AbstractSerializingData
|
|||
PivotConfigTests.randomPivotConfig(),
|
||||
randomBoolean() ? null : randomAlphaOfLengthBetween(1, 1000),
|
||||
randomBoolean() ? null : Instant.now(),
|
||||
randomBoolean() ? null : Version.CURRENT.toString());
|
||||
randomBoolean() ? null : Version.V_7_2_0.toString());
|
||||
DataFrameTransformConfigUpdate update = new DataFrameTransformConfigUpdate(null, null, null, null, null);
|
||||
|
||||
assertThat(config, equalTo(update.apply(config)));
|
||||
|
@ -108,6 +108,7 @@ public class DataFrameTransformConfigUpdateTests extends AbstractSerializingData
|
|||
assertThat(updatedConfig.getSyncConfig(), equalTo(syncConfig));
|
||||
assertThat(updatedConfig.getDescription(), equalTo(newDescription));
|
||||
assertThat(updatedConfig.getHeaders(), equalTo(headers));
|
||||
assertThat(updatedConfig.getVersion(), equalTo(Version.CURRENT));
|
||||
}
|
||||
|
||||
public void testApplyWithSyncChange() {
|
||||
|
|
Loading…
Reference in New Issue