Skip to content

Commit

Permalink
add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
haiqingchq committed Dec 4, 2024
1 parent e61f440 commit 95e243a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion internal/tools/pipeline/providers/dbgc/dbgc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import (
)

func TestReconciler_doPipelineDatabaseGC(t *testing.T) {

var pipelines = []spec.Pipeline{
{
PipelineBase: spec.PipelineBase{ID: 1, Status: apistructs.PipelineStatusAnalyzed},
Expand Down Expand Up @@ -236,3 +235,12 @@ func TestReconciler_doPipelineDatabaseGC1(t *testing.T) {
r.doPipelineDatabaseGC(context.Background(), &pipelinepb.PipelinePagingRequest{PageNum: 1})
})
}

func TestDoDBGC(t *testing.T) {
p := provider{}
pipeline := &spec.Pipeline{}
needArchive := true
assert.Panics(t, func() {
p.DoDBGC(pipeline, apistructs.PipelineGCDBOption{NeedArchive: needArchive})
})
}

0 comments on commit 95e243a

Please sign in to comment.