Skip to content

Commit 5d55818

Browse files
authored
Merge pull request #142 from fluxcd/devel-docs
Document e2e testing and supported providers
2 parents 5445839 + 06502fc commit 5d55818

File tree

2 files changed

+42
-14
lines changed

2 files changed

+42
-14
lines changed

DEVELOPMENT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Development
2+
3+
> **Note:** Please take a look at <https://fluxcd.io/docs/contributing/flux/>
4+
> to find out about how to contribute to Flux and how to interact with the
5+
> Flux Development team.
6+
7+
## How to run the test suite
8+
9+
Prerequisites:
10+
* go >= 1.17
11+
12+
To run `make test` for your fork/branch you need to supply the following environment variables:
13+
14+
- `GIT_PROVIDER_ORGANIZATION` For GitHub this should be an organization; for GitLab this should be a top-level group; for BitBucket Server this should be project. As this environment variable is used for both test suites, the name of the GitHub organization must match the name of the GitLab top-level group. Also, this organization needs to have its repository default branch set to `main`.
15+
- `GIT_PROVIDER_USER` This should be the same username for both GitHub and GitLab.
16+
- `GITLAB_TEST_TEAM_NAME` An existing GitLab group.
17+
- `GITLAB_TEST_SUBGROUP` An existing GitLab subgroup of the GIT_PROVIDER_ORGANIZATION top-level group.
18+
- `GITPROVIDER_BOT_TOKEN` A GitHub token with `repo`, `admin:org` and `delete_repo` permissions.
19+
- `GITLAB_TOKEN` A GitLab token with `api` scope.
20+
- `STASH_USER` The BitBucket Server user name.
21+
- `STASH_DOMAIN` The BitBucket Server domain name.
22+
- `STASH_TOKEN` A BitBucket Server token.
23+
- `TEST_VERBOSE` Set to '-v' to emit test output for debugging purposes
24+
- `CLEANUP_ALL` Set to delete all test repos after testing.
25+
26+
## End-to-end testing
27+
28+
The e2e testing suite runs in GitHub Actions on each commit to the main branch.
29+
30+
The test suite targets the following providers:
31+
32+
* GitHub.com (fluxcd-testing organization)
33+
* GitLab.com (fluxcd-testing group)
34+
* BitBucket Server (hosted by Weaveworks in GCP)

README.md

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@
55
[![Go Report Card](https://goreportcard.com/badge/github.com/fluxcd/go-git-providers)](https://goreportcard.com/report/github.com/fluxcd/go-git-providers)
66
[![codecov.io](https://codecov.io/github/fluxcd/go-git-providers/coverage.svg?branch=master)](https://codecov.io/github/fluxcd/go-git-providers?branch=master)
77
[![LICENSE](https://img.shields.io/github/license/fluxcd/go-git-providers)](https://github.com/fluxcd/go-git-providers/blob/master/LICENSE)
8-
[![Contributors](https://img.shields.io/github/contributors/fluxcd/go-git-providers)](https://github.com/fluxcd/go-git-providers/graphs/contributors)
98
[![Release](https://img.shields.io/github/v/release/fluxcd/go-git-providers?include_prereleases)](https://github.com/fluxcd/go-git-providers/releases/latest)
10-
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/fluxcd/go-git-providers/blob/master/CONTRIBUTING.md)
119

12-
[go-git-providers](https://pkg.go.dev/github.com/fluxcd/go-git-providers) is a general-purpose Go client for interacting with Git providers' APIs (e.g. GitHub, GitLab, Bitbucket).
10+
[go-git-providers](https://pkg.go.dev/github.com/fluxcd/go-git-providers)
11+
is a general-purpose Go client for interacting with Git providers' APIs.
12+
13+
Supported providers:
14+
15+
- GitHub API (GitHub.com and on-prem)
16+
- GitLab API (GitLab.com and on-prem)
17+
- Bitbucket Server API (on-prem)
1318

1419
## Features
1520

@@ -172,17 +177,6 @@ See the following (automatically tested) examples:
172177
- [github/example_organization_test.go](github/example_organization_test.go)
173178
- [github/example_repository_test.go](github/example_repository_test.go)
174179

175-
176-
If you need to run `make test` for your fork/branch you may need to supply the following environment variables:
177-
- GIT_PROVIDER_ORGANIZATION : For GitHub this should be an organization whereas for GitLab this should be a top-level group. As this environment variable is used for both test suites, the name of the GitHub organization must match the name of the GitLab top-level group. Also, this organization needs to have its repository default branch set to `main`.
178-
- GIT_PROVIDER_USER : This should be the same username for both GitHub and GitLab.
179-
- GITLAB_TEST_TEAM_NAME : An existing GitLab group.
180-
- GITLAB_TEST_SUBGROUP : An existing GitLab subgroup of the GIT_PROVIDER_ORGANIZATION top-level group.
181-
- GITPROVIDER_BOT_TOKEN : A GitHub token with `repo`, `admin:org` and `delete_repo` permissions.
182-
- GITLAB_TOKEN: A GitLab token with `api` scope.
183-
- TEST_VERBOSE: Set to '-v' to emit test output for debugging purposes
184-
- CLEANUP_ALL: Set to delete all test repos after testing.
185-
186180
## Getting Help
187181

188182
If you have any questions about this library:

0 commit comments

Comments
 (0)