Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public boolean equals(java.lang.Object o) {
}
V1Secret v1Secret = (V1Secret) o;
return Objects.equals(this.apiVersion, v1Secret.apiVersion) &&
Objects.equals(this.data, v1Secret.data) &&
Objects.deepEquals(this.data, v1Secret.data) &&
Objects.equals(this.kind, v1Secret.kind) &&
Objects.equals(this.metadata, v1Secret.metadata) &&
Objects.equals(this.stringData, v1Secret.stringData) &&
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package io.kubernetes.client.models;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.MatcherAssert.assertThat;

import java.util.HashMap;
import java.util.Map;
import org.junit.Test;

public class V1SecretTest {

@Test
public void testEquals() {
final Map<String, byte[]> data1 = new HashMap<>();
data1.put("foo", new byte[]{1, 2, 3, 4});
data1.put("bar", new byte[]{5, 6, 7, 8});
final V1Secret secret1 = new V1SecretBuilder()
.withData(data1)
.build();

final Map<String, byte[]> data2 = new HashMap<>();
data2.put("foo", new byte[]{1, 2, 3, 4});
data2.put("bar", new byte[]{5, 6, 7, 8});
final V1Secret secret2 = new V1SecretBuilder()
.withData(data2)
.build();

assertThat(secret1, equalTo(secret2));
}
}