Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Coleen Iona Quadros <coleen.quadros27@gmail.com>
  • Loading branch information
coleenquadros committed Oct 24, 2024
1 parent fa5c078 commit 0487ead
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,22 @@ func TestUpdateObservatoriumCR(t *testing.T) {
t.Errorf("%v should be equal to %v", string(createdSpecBytes), string(updatedSpecBytes))
}

// Test Observaotrium CR gets updated with new update from MCO
mco.Spec.StorageConfig.CompactStorageSize = "2Gi"
_, err = GenerateObservatoriumCR(cl, s, mco)
if err != nil {
t.Errorf("Failed to update observatorium due to %v", err)
}
updatedObservatorium = &observatoriumv1alpha1.Observatorium{}
cl.Get(context.TODO(), types.NamespacedName{
Name: mcoconfig.GetDefaultCRName(),
Namespace: namespace,
}, updatedObservatorium)

if updatedObservatorium.Spec.Thanos.Compact.VolumeClaimTemplate.Spec.Resources.Requests.Storage().String() != "2Gi" {
t.Errorf("Failed to update observatorium CR with new compact storage size")
}

}

func TestTShirtSizeUpdateObservatoriumCR(t *testing.T) {
Expand Down

0 comments on commit 0487ead

Please sign in to comment.