MCPcopy
hub / github.com/apecloud/kubeblocks / createRestoreOpsObj

Function createRestoreOpsObj

pkg/operations/restore_test.go:242–263  ·  view source on GitHub ↗
(clusterName, restoreOpsName, backupName string)

Source from the content-addressed store, hash-verified

240})
241
242func createRestoreOpsObj(clusterName, restoreOpsName, backupName string) *opsv1alpha1.OpsRequest {
243 ops := &opsv1alpha1.OpsRequest{
244 ObjectMeta: metav1.ObjectMeta{
245 Name: restoreOpsName,
246 Namespace: testCtx.DefaultNamespace,
247 Labels: map[string]string{
248 constant.AppInstanceLabelKey: clusterName,
249 constant.OpsRequestTypeLabelKey: string(opsv1alpha1.RestoreType),
250 },
251 },
252 Spec: opsv1alpha1.OpsRequestSpec{
253 ClusterName: clusterName,
254 Type: opsv1alpha1.RestoreType,
255 SpecificOpsRequest: opsv1alpha1.SpecificOpsRequest{
256 Restore: &opsv1alpha1.Restore{
257 BackupName: backupName,
258 },
259 },
260 },
261 }
262 return testops.CreateOpsRequest(ctx, testCtx, ops)
263}

Callers 1

restore_test.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…