mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-09-28 10:45:44 +00:00
Move the progress messages to activities (#10552)
Run the E2E test on kind / setup-test-matrix (push) Failing after 3s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 10s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
Run the E2E test on kind / setup-test-matrix (push) Failing after 3s
Scorecard supply-chain security / Scorecard analysis (push) Skipped
e2e-test-kind.yaml / extract (push) Failing after 8s
Run the E2E test on kind / get-go-version (push) Failing after 10s
Run the E2E test on kind / build (push) Skipped
Run the E2E test on kind / run-e2e-test (push) Skipped
push.yml / extract (push) Failing after 6s
Main CI / get-go-version (push) Failing after 7s
Main CI / Build (push) Skipped
* move the progress messages to activities Signed-off-by: Lyndon-Li <lyonghui@vmware.com> * update doc for activities in data mover CR Signed-off-by: Lyndon-Li <lyonghui@vmware.com> --------- Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
This commit is contained in:
@@ -851,7 +851,7 @@ func TestOnDataUploadProgress(t *testing.T) {
|
||||
|
||||
// Call the OnDataUploadProgress function
|
||||
r.OnDataUploadProgress(ctx, namespace, duName, progress)
|
||||
if len(test.needErrs) != 0 && !test.needErrs[0] {
|
||||
if len(test.needErrs) == 0 {
|
||||
// Get the updated DataUpload object from the fake client
|
||||
updatedDu := &velerov2alpha1api.DataUpload{}
|
||||
require.NoError(t, r.client.Get(ctx, types.NamespacedName{Name: duName, Namespace: namespace}, updatedDu))
|
||||
@@ -867,7 +867,12 @@ func TestOnDataUploadProgress(t *testing.T) {
|
||||
assert.Equal(t, int64(0), updatedDu.Status.Progress.BytesDone) // assuming default or original value
|
||||
}
|
||||
if progress.Message != "" {
|
||||
assert.Contains(t, updatedDu.Status.Message, progress.Message)
|
||||
assert.Contains(t, updatedDu.Status.Activities, progress.Message)
|
||||
|
||||
// Call with the same message again to verify deduplication
|
||||
r.OnDataUploadProgress(ctx, namespace, duName, progress)
|
||||
require.NoError(t, r.client.Get(ctx, types.NamespacedName{Name: duName, Namespace: namespace}, updatedDu))
|
||||
assert.Equal(t, []string{progress.Message}, updatedDu.Status.Activities)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user