vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
|
a407c4af
Keenan Nemetz
1d ago
|
1 | package instancerepo |
| 2 | ||
| 3 | import ( | |
| 4 | "strings" | |
| 5 | "testing" | |
| 6 | ) | |
| 7 | ||
| 8 | // The landing page renders the heading from instance_name, so the starter | |
| 9 | // introduction must not repeat it, and it must point at the repository that | |
| 10 | // holds the file it asks the reader to edit. | |
| 11 | func TestTemplateIntroductionHasNoHeaderAndLinksItsRepository(t *testing.T) { | |
| 12 | t.Parallel() | |
| 13 | readme := string(Template("acme-instance")["profile/README.md"]) | |
| 14 | if strings.HasPrefix(strings.TrimSpace(readme), "#") { | |
| 15 | t.Fatalf("profile/README.md starts with a header: %q", readme) | |
| 16 | } | |
| 17 | if !strings.Contains(readme, "`profile/README.md`") || | |
|
ed03b3d1
Keenan Nemetz
4h ago
|
18 | !strings.Contains(readme, "](/acme-instance)") { |
|
a407c4af
Keenan Nemetz
1d ago
|
19 | t.Fatalf("profile/README.md does not explain how to customize the introduction: %q", readme) |
| 20 | } | |
| 21 | } | |
| 22 | ||
| 23 | func TestTemplateIntroductionWithoutARepositoryNameStaysText(t *testing.T) { | |
| 24 | t.Parallel() | |
| 25 | readme := string(Template("")["profile/README.md"]) | |
| 26 | if strings.Contains(readme, "](") { | |
| 27 | t.Fatalf("profile/README.md with no repository name has a link: %q", readme) | |
| 28 | } | |
| 29 | } |