Skip to content

Commit 95d16ba

Browse files
committed
tests: hard-code a config
The idea is to stop _having_ a default config. Therefore, the tests need to bring their own. Let's just use a copy of the current default config there. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent a141767 commit 95d16ba

File tree

1 file changed

+67
-1
lines changed

1 file changed

+67
-1
lines changed

tests/test-lib.ts

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,75 @@ import * as path from "path";
44
import { fileURLToPath } from "url";
55
import { isDirectory, isFile } from "../lib/fs-util.js";
66
import { git, IGitOptions, revParse } from "../lib/git.js";
7-
import defaultConfig from "../lib/gitgitgadget-config.js";
7+
import { IConfig } from "../lib/project-config.js";
88
const dirName = path.dirname(fileURLToPath(import.meta.url));
99

10+
const defaultConfig: IConfig = {
11+
repo: {
12+
name: "git",
13+
owner: "gitgitgadget",
14+
upstreamOwner: "git",
15+
testOwner: "dscho",
16+
branches: ["maint", "seen"],
17+
closingBranches: ["maint", "master"],
18+
trackingBranches: ["maint", "seen", "master", "next"],
19+
maintainerBranch: "gitster",
20+
host: "github.com",
21+
},
22+
mailrepo: {
23+
name: "git",
24+
owner: "gitgitgadget",
25+
branch: "master",
26+
host: "lore.kernel.org",
27+
url: "https://lore.kernel.org/git/",
28+
public_inbox_epoch: 1,
29+
mirrorURL: "https://github.com/gitgitgadget/git-mailing-list-mirror",
30+
mirrorRef: "refs/heads/lore-1",
31+
descriptiveName: "lore.kernel/git",
32+
},
33+
mail: {
34+
author: "GitGitGadget",
35+
sender: "GitGitGadget",
36+
smtpUser: "[email protected]",
37+
smtpHost: "smtp.gmail.com",
38+
},
39+
project: {
40+
// The Git maintainer specifically requested not to be Cc:ed, see
41+
// b2221f4e (Stop Cc:ing the Git maintainer, 2020-01-08) for specifics,
42+
// hence no `cc: "Junio Hamano <[email protected]>"`
43+
cc: [],
44+
45+
urlPrefix: "https://lore.kernel.org/git/",
46+
},
47+
app: {
48+
appID: 12836,
49+
installationID: 195971,
50+
name: "gitgitgadget",
51+
displayName: "GitGitGadget",
52+
altname: "gitgitgadget-git",
53+
installedOn: ["gitgitgadget", "git", "dscho"],
54+
},
55+
lint: {
56+
maxCommitsIgnore: ["https://github.com/gitgitgadget/git/pull/923"],
57+
maxCommits: 30,
58+
},
59+
user: {
60+
allowUserAsLogin: false,
61+
},
62+
syncUpstreamBranches: [
63+
{
64+
sourceRepo: "gitster/git",
65+
targetRepo: "gitgitgadget/git",
66+
sourceRefRegex: "^refs/heads/(maint-\\d|[a-z][a-z]/)",
67+
},
68+
{
69+
sourceRepo: "j6t/git-gui",
70+
targetRepo: "gitgitgadget/git",
71+
targetRefNamespace: "git-gui/",
72+
},
73+
],
74+
};
75+
1076
export const testConfig = {
1177
...defaultConfig,
1278
// We're running in the test suite!

0 commit comments

Comments
 (0)