@Test public void testSizeChanges() { Storage persistent = new PersistentClaimStorageBuilder().withStorageClass("gp2-ssd").withDeleteClaim(false).withId(0).withSize("100Gi").build(); Storage persistent2 = new PersistentClaimStorageBuilder().withStorageClass("gp2-ssd").withDeleteClaim(false).withId(0).withSize("1000Gi").build(); Storage persistent3 = new PersistentClaimStorageBuilder().withStorageClass("gp2-ssd").withDeleteClaim(false).withId(0).withSize("10Gi").build(); assertThat(new StorageDiff(persistent, persistent, 3, 3).shrinkSize(), is(false)); assertThat(new StorageDiff(persistent, persistent2, 3, 3).shrinkSize(), is(false)); assertThat(new StorageDiff(persistent, persistent3, 3, 3).shrinkSize(), is(true)); }
public boolean shrinkSize() { return shrinkSize; }
StorageDiff extends AbstractResourceDiff { public boolean shrinkSize() { return shrinkSize; } }
StorageDiff extends AbstractResourceDiff { public boolean shrinkSize() { return shrinkSize; } StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas); private  StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas, String volumeDesc); }
StorageDiff extends AbstractResourceDiff { public boolean shrinkSize() { return shrinkSize; } StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas); private  StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas, String volumeDesc); @Override boolean isEmpty(); boolean changesType(); boolean shrinkSize(); }
StorageDiff extends AbstractResourceDiff { public boolean shrinkSize() { return shrinkSize; } StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas); private  StorageDiff(Storage current, Storage desired, int currentReplicas, int desiredReplicas, String volumeDesc); @Override boolean isEmpty(); boolean changesType(); boolean shrinkSize();  }