Skip to content

Commit

Permalink
fix: repo.install_id test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
plyr4 committed Oct 29, 2024
1 parent 249099d commit 9410191
Show file tree
Hide file tree
Showing 52 changed files with 155 additions and 66 deletions.
6 changes: 3 additions & 3 deletions api/types/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,6 @@ func (r *Repo) String() string {
Counter: %d,
FullName: %s,
ID: %d,
InstallID: %d,
Link: %s,
Name: %s,
Org: %s,
Expand All @@ -668,7 +667,8 @@ func (r *Repo) String() string {
Timeout: %d,
Topics: %s,
Trusted: %t,
Visibility: %s
Visibility: %s,
InstallID: %d
}`,
r.GetActive(),
r.GetAllowEvents().List(),
Expand All @@ -679,7 +679,6 @@ func (r *Repo) String() string {
r.GetCounter(),
r.GetFullName(),
r.GetID(),
r.GetInstallID(),
r.GetLink(),
r.GetName(),
r.GetOrg(),
Expand All @@ -691,5 +690,6 @@ func (r *Repo) String() string {
r.GetTopics(),
r.GetTrusted(),
r.GetVisibility(),
r.GetInstallID(),
)
}
4 changes: 3 additions & 1 deletion api/types/repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ func TestTypes_Repo_String(t *testing.T) {
Timeout: %d,
Topics: %s,
Trusted: %t,
Visibility: %s
Visibility: %s,
InstallID: %d
}`,
r.GetActive(),
r.GetAllowEvents().List(),
Expand All @@ -325,6 +326,7 @@ func TestTypes_Repo_String(t *testing.T) {
r.GetTopics(),
r.GetTrusted(),
r.GetVisibility(),
r.GetInstallID(),
)

// run test
Expand Down
78 changes: 51 additions & 27 deletions compiler/native/environment_test.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions database/build/clean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func TestBuild_Engine_CleanBuilds(t *testing.T) {
_repo.SetVisibility("public")
_repo.SetPipelineType("yaml")
_repo.SetTopics([]string{})
_repo.SetInstallID(0)
_repo.SetAllowEvents(api.NewEventsFromMask(1))

_owner := testutils.APIUser()
Expand Down
1 change: 1 addition & 0 deletions database/build/count_deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func TestBuild_Engine_CountBuildsForDeployment(t *testing.T) {
_repo.SetVisibility("public")
_repo.SetPipelineType("yaml")
_repo.SetTopics([]string{})
_repo.SetInstallID(0)
_repo.SetAllowEvents(api.NewEventsFromMask(1))

_owner := testutils.APIUser()
Expand Down
2 changes: 2 additions & 0 deletions database/build/count_org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestBuild_Engine_CountBuildsForOrg(t *testing.T) {
_repoOne.SetVisibility("public")
_repoOne.SetPipelineType("yaml")
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -42,6 +43,7 @@ func TestBuild_Engine_CountBuildsForOrg(t *testing.T) {
_repoTwo.SetVisibility("public")
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetTopics([]string{})
_repoTwo.SetInstallID(0)

_buildOne := testutils.APIBuild()
_buildOne.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/build/get_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestBuild_Engine_GetBuildForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_build := testutils.APIBuild()
_build.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/build/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestBuild_Engine_GetBuild(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_build := testutils.APIBuild()
_build.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/build/last_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestBuild_Engine_LastBuildForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_build := testutils.APIBuild()
_build.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/build/list_org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestBuild_Engine_ListBuildsForOrg(t *testing.T) {
_repoOne.SetPipelineType("yaml")
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -45,6 +46,7 @@ func TestBuild_Engine_ListBuildsForOrg(t *testing.T) {
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetTopics([]string{})
_repoTwo.SetInstallID(0)

_buildOne := testutils.APIBuild()
_buildOne.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/build/list_pending_running_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestBuild_Engine_ListPendingAndRunningBuildsForRepo(t *testing.T) {
_repoOne.SetPipelineType("yaml")
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -43,6 +44,7 @@ func TestBuild_Engine_ListPendingAndRunningBuildsForRepo(t *testing.T) {
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetTopics([]string{})
_repoTwo.SetInstallID(0)

_buildOne := testutils.APIBuild()
_buildOne.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/build/list_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestBuild_Engine_ListBuildsForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_buildOne := testutils.APIBuild()
_buildOne.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/build/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestBuild_Engine_ListBuilds(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_buildOne := testutils.APIBuild()
_buildOne.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/deployment/get_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestDeployment_Engine_GetDeploymentForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/deployment/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestDeployment_Engine_GetDeployment(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_deploymentOne := testutils.APIDeployment()
_deploymentOne.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/deployment/list_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestDeployment_Engine_ListDeploymentsForRepo(t *testing.T) {
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetPipelineType(constants.PipelineTypeYAML)
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -44,6 +45,7 @@ func TestDeployment_Engine_ListDeploymentsForRepo(t *testing.T) {
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetPipelineType(constants.PipelineTypeYAML)
_repoTwo.SetTopics([]string{})
_repoTwo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/deployment/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestDeployment_Engine_ListDeployments(t *testing.T) {
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetPipelineType(constants.PipelineTypeYAML)
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/get_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_GetHookForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_GetHook(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/get_webhook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_GetHookByWebhookID(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/last_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_LastHookForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/list_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_ListHooksForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/hook/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestHook_Engine_ListHooks(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_repoBuild := new(api.Repo)
_repoBuild.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/pipeline/get_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestPipeline_Engine_GetPipelineForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_pipeline := testutils.APIPipeline()
_pipeline.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/pipeline/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestPipeline_Engine_GetPipeline(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_pipeline := testutils.APIPipeline()
_pipeline.SetID(1)
Expand Down
1 change: 1 addition & 0 deletions database/pipeline/list_repo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestPipeline_Engine_ListPipelinesForRepo(t *testing.T) {
_repo.SetAllowEvents(api.NewEventsFromMask(1))
_repo.SetPipelineType(constants.PipelineTypeYAML)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_pipelineOne := testutils.APIPipeline()
_pipelineOne.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/pipeline/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func TestPipeline_Engine_ListPipelines(t *testing.T) {
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetPipelineType(constants.PipelineTypeYAML)
_repoOne.SetTopics([]string{})
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -44,6 +45,7 @@ func TestPipeline_Engine_ListPipelines(t *testing.T) {
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetPipelineType(constants.PipelineTypeYAML)
_repoTwo.SetTopics([]string{})
_repoTwo.SetInstallID(0)

_pipelineOne := testutils.APIPipeline()
_pipelineOne.SetID(1)
Expand Down
7 changes: 4 additions & 3 deletions database/repo/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ func TestRepo_Engine_CreateRepo(t *testing.T) {
_repo.SetPipelineType("yaml")
_repo.SetPreviousName("oldName")
_repo.SetTopics([]string{})
_repo.SetInstallID(0)

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand All @@ -34,9 +35,9 @@ func TestRepo_Engine_CreateRepo(t *testing.T) {

// ensure the mock expects the query
_mock.ExpectQuery(`INSERT INTO "repos"
("user_id","hash","org","name","full_name","link","clone","branch","topics","build_limit","timeout","counter","visibility","private","trusted","active","allow_events","pipeline_type","previous_name","approve_build","id")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21) RETURNING "id"`).
WithArgs(1, AnyArgument{}, "foo", "bar", "foo/bar", nil, nil, nil, AnyArgument{}, AnyArgument{}, AnyArgument{}, AnyArgument{}, "public", false, false, false, nil, "yaml", "oldName", nil, 1).
("user_id","hash","org","name","full_name","link","clone","branch","topics","build_limit","timeout","counter","visibility","private","trusted","active","allow_events","pipeline_type","previous_name","approve_build","install_id","id")
VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22) RETURNING "id"`).
WithArgs(1, AnyArgument{}, "foo", "bar", "foo/bar", nil, nil, nil, AnyArgument{}, AnyArgument{}, AnyArgument{}, AnyArgument{}, "public", false, false, false, nil, "yaml", "oldName", nil, 0, 1).
WillReturnRows(_rows)

_sqlite := testSqlite(t)
Expand Down
1 change: 1 addition & 0 deletions database/repo/get_org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestRepo_Engine_GetRepoForOrg(t *testing.T) {
_repo.SetVisibility("public")
_repo.SetPipelineType("yaml")
_repo.SetTopics([]string{})
_repo.SetInstallID(0)
_repo.SetAllowEvents(api.NewEventsFromMask(1))

_owner := testutils.APIUser().Crop()
Expand Down
1 change: 1 addition & 0 deletions database/repo/get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ func TestRepo_Engine_GetRepo(t *testing.T) {
_repo.SetVisibility("public")
_repo.SetPipelineType("yaml")
_repo.SetTopics([]string{})
_repo.SetInstallID(0)
_repo.SetAllowEvents(api.NewEventsFromMask(1))

_owner := testutils.APIUser().Crop()
Expand Down
2 changes: 2 additions & 0 deletions database/repo/list_org_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestRepo_Engine_ListReposForOrg(t *testing.T) {
_repoOne.SetPipelineType("yaml")
_repoOne.SetTopics([]string{})
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -46,6 +47,7 @@ func TestRepo_Engine_ListReposForOrg(t *testing.T) {
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetTopics([]string{})
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetInstallID(0)

_buildOne := new(api.Build)
_buildOne.SetID(1)
Expand Down
2 changes: 2 additions & 0 deletions database/repo/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func TestRepo_Engine_ListRepos(t *testing.T) {
_repoOne.SetPipelineType("yaml")
_repoOne.SetTopics([]string{})
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -45,6 +46,7 @@ func TestRepo_Engine_ListRepos(t *testing.T) {
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetTopics([]string{})
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetInstallID(0)

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()
Expand Down
2 changes: 2 additions & 0 deletions database/repo/list_user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestRepo_Engine_ListReposForUser(t *testing.T) {
_repoOne.SetPipelineType("yaml")
_repoOne.SetTopics([]string{})
_repoOne.SetAllowEvents(api.NewEventsFromMask(1))
_repoOne.SetInstallID(0)

_repoTwo := testutils.APIRepo()
_repoTwo.SetID(2)
Expand All @@ -46,6 +47,7 @@ func TestRepo_Engine_ListReposForUser(t *testing.T) {
_repoTwo.SetPipelineType("yaml")
_repoTwo.SetTopics([]string{})
_repoTwo.SetAllowEvents(api.NewEventsFromMask(1))
_repoTwo.SetInstallID(0)

_buildOne := new(api.Build)
_buildOne.SetID(1)
Expand Down
7 changes: 4 additions & 3 deletions database/repo/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,17 @@ func TestRepo_Engine_UpdateRepo(t *testing.T) {
_repo.SetPreviousName("oldName")
_repo.SetApproveBuild(constants.ApproveForkAlways)
_repo.SetTopics([]string{})
_repo.SetInstallID(0)
_repo.SetAllowEvents(api.NewEventsFromMask(1))

_postgres, _mock := testPostgres(t)
defer func() { _sql, _ := _postgres.client.DB(); _sql.Close() }()

// ensure the mock expects the query
_mock.ExpectExec(`UPDATE "repos"
SET "user_id"=$1,"hash"=$2,"org"=$3,"name"=$4,"full_name"=$5,"link"=$6,"clone"=$7,"branch"=$8,"topics"=$9,"build_limit"=$10,"timeout"=$11,"counter"=$12,"visibility"=$13,"private"=$14,"trusted"=$15,"active"=$16,"allow_events"=$17,"pipeline_type"=$18,"previous_name"=$19,"approve_build"=$20
WHERE "id" = $21`).
WithArgs(1, AnyArgument{}, "foo", "bar", "foo/bar", nil, nil, nil, AnyArgument{}, AnyArgument{}, AnyArgument{}, AnyArgument{}, "public", false, false, false, 1, "yaml", "oldName", constants.ApproveForkAlways, 1).
SET "user_id"=$1,"hash"=$2,"org"=$3,"name"=$4,"full_name"=$5,"link"=$6,"clone"=$7,"branch"=$8,"topics"=$9,"build_limit"=$10,"timeout"=$11,"counter"=$12,"visibility"=$13,"private"=$14,"trusted"=$15,"active"=$16,"allow_events"=$17,"pipeline_type"=$18,"previous_name"=$19,"approve_build"=$20,"install_id"=$21
WHERE "id" = $22`).
WithArgs(1, AnyArgument{}, "foo", "bar", "foo/bar", nil, nil, nil, AnyArgument{}, AnyArgument{}, AnyArgument{}, AnyArgument{}, "public", false, false, false, 1, "yaml", "oldName", constants.ApproveForkAlways, 0, 1).
WillReturnResult(sqlmock.NewResult(1, 1))

_sqlite := testSqlite(t)
Expand Down
1 change: 1 addition & 0 deletions database/schedule/count_active_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ func TestSchedule_Engine_CountActiveSchedules(t *testing.T) {
_repo.SetPipelineType("")
_repo.SetPreviousName("")
_repo.SetApproveBuild(constants.ApproveNever)
_repo.SetInstallID(0)

currTime := time.Now().UTC()
nextTime, _ := gronx.NextTickAfter("0 0 * * *", currTime, false)
Expand Down
Loading

0 comments on commit 9410191

Please sign in to comment.