reconcile artifact
Signed-off-by: Somtochi Onyekwere <somtochionyekwere@gmail.com>
This commit is contained in:
parent
648beef063
commit
eb40efea1c
|
@ -608,6 +608,28 @@ func TestOCIRepository_reconcileSource_remoteReference(t *testing.T) {
|
||||||
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.OCIOperationFailedReason, "failed to pull artifact"),
|
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.OCIOperationFailedReason, "failed to pull artifact"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "invalid semver reference",
|
||||||
|
reference: &sourcev1.OCIRepositoryRef{
|
||||||
|
SemVer: "<= 6.1.0",
|
||||||
|
},
|
||||||
|
want: sreconcile.ResultEmpty,
|
||||||
|
wantErr: true,
|
||||||
|
assertConditions: []metav1.Condition{
|
||||||
|
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.URLInvalidReason, "no match found for semver:"),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "invalid digest reference",
|
||||||
|
reference: &sourcev1.OCIRepositoryRef{
|
||||||
|
Digest: "invalid",
|
||||||
|
},
|
||||||
|
want: sreconcile.ResultEmpty,
|
||||||
|
wantErr: true,
|
||||||
|
assertConditions: []metav1.Condition{
|
||||||
|
*conditions.TrueCondition(sourcev1.FetchFailedCondition, sourcev1.OCIOperationFailedReason, "failed to pull artifact"),
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "semver should take precedence over tag",
|
name: "semver should take precedence over tag",
|
||||||
reference: &sourcev1.OCIRepositoryRef{
|
reference: &sourcev1.OCIRepositoryRef{
|
||||||
|
|
Loading…
Reference in New Issue