Add wire tests to delete autoscaling policy request
This commit adds some wire serializing tests for delete autoscaling policy requests.
This commit is contained in:
parent
98c4165348
commit
8f520f0a9c
|
@ -53,6 +53,19 @@ public class DeleteAutoscalingPolicyAction extends ActionType<AcknowledgedRespon
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
final Request request = (Request) o;
|
||||
return name.equals(request.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
package org.elasticsearch.xpack.autoscaling.action;
|
||||
|
||||
import org.elasticsearch.common.io.stream.Writeable;
|
||||
import org.elasticsearch.test.AbstractWireSerializingTestCase;
|
||||
|
||||
public class DeleteAutoscalingPolicyActionRequestWireSerializingTests extends AbstractWireSerializingTestCase<
|
||||
DeleteAutoscalingPolicyAction.Request> {
|
||||
|
||||
@Override
|
||||
protected Writeable.Reader<DeleteAutoscalingPolicyAction.Request> instanceReader() {
|
||||
return DeleteAutoscalingPolicyAction.Request::new;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected DeleteAutoscalingPolicyAction.Request createTestInstance() {
|
||||
return new DeleteAutoscalingPolicyAction.Request(randomAlphaOfLength(8));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue