From a414703c09e5a3b2f63ab442f080a78a39876341 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 3 Jul 2024 12:53:32 +0200 Subject: [PATCH] tests: Add an IsTemplate option to DeclarativeRepoOptions This lets us use `CreateDeclarativeRepoWithOptions` to create template repositories. Signed-off-by: Gergely Nagy --- tests/integration/integration_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/integration_test.go b/tests/integration/integration_test.go index dafc000ff..301a9e954 100644 --- a/tests/integration/integration_test.go +++ b/tests/integration/integration_test.go @@ -701,6 +701,7 @@ type DeclarativeRepoOptions struct { Files optional.Option[[]*files_service.ChangeRepoFile] WikiBranch optional.Option[string] AutoInit optional.Option[bool] + IsTemplate optional.Option[bool] } func CreateDeclarativeRepoWithOptions(t *testing.T, owner *user_model.User, opts DeclarativeRepoOptions) (*repo_model.Repository, string, func()) { @@ -731,6 +732,7 @@ func CreateDeclarativeRepoWithOptions(t *testing.T, owner *user_model.User, opts License: "WTFPL", Readme: "Default", DefaultBranch: "main", + IsTemplate: opts.IsTemplate.Value(), }) require.NoError(t, err) assert.NotEmpty(t, repo)