You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add test config for EMU enterprise and helper functions to skip tests
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
* Introduce `testAcc` setting for repo visibility
This enables GHEC EMU to run tests without having to manually skip everything public
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
---------
Signed-off-by: Timo Sand <timo.sand@f-secure.com>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+7-4Lines changed: 7 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,9 @@ This section describes a typical sequence performed when developing locally. Ful
33
33
Once you have the repository cloned, there's a couple of additional steps you'll need to take. Since most of the testing is acceptance or integration testing, we need to manipulate real GitHub resources in order to run it. Useful setup steps are listed below:
34
34
35
35
- If you haven't already, [create a GitHub organization you can use for testing](#github-organization).
36
-
- Optional: you may find it beneficial to create a test user as well in order to avoid potential rate-limiting issues on your main account.
37
-
- Your organization _must_ have a repository called `terraform-template-module`. The [terraformtesting/terraform-template-module](https://github.com/terraformtesting/terraform-template-module) repo is a good, re-usable example.
38
-
- You _must_ make sure that the "Template Repository" item in Settings is checked for this repo.
36
+
- Optional: you may find it beneficial to create a test user as well in order to avoid potential rate-limiting issues on your main account.
37
+
- Your organization _must_ have a repository called `terraform-template-module`. The [terraformtesting/terraform-template-module](https://github.com/terraformtesting/terraform-template-module) repo is a good, re-usable example.
38
+
- You _must_ make sure that the "Template Repository" item in Settings is checked for this repo.
39
39
- If you haven't already, generate a Personal Access Token (PAT) for authenticating your test runs.
40
40
- Export the necessary configuration for authenticating your provider with GitHub
41
41
@@ -52,7 +52,7 @@ Once you have the repository cloned, there's a couple of additional steps you'll
52
52
### Local Development Iteration
53
53
54
54
1. Write a test describing what you will fix. See [`github_label`](./github/resource_github_issue_label_test.go) for an example format.
55
-
1. Run your test and observe it fail. Enabling debug output allows for observing the underlying requests and responses made as well as viewing state (search `STATE:`) generated during the acceptance test run.
55
+
2. Run your test and observe it fail. Enabling debug output allows for observing the underlying requests and responses made as well as viewing state (search `STATE:`) generated during the acceptance test run.
56
56
57
57
```sh
58
58
TF_LOG=DEBUG TF_ACC=1 go test -v ./... -run ^TestAccGithubIssueLabel
# Configure if the enterprise is an EMU enterprise
187
+
export GH_TEST_ENTERPRISE_IS_EMU=
185
188
```
186
189
187
190
There are also a small amount of unit tests in the provider. Due to the nature of the provider, such tests are currently only recommended for exercising functionality completely internal to the provider. These may be executed by running `make test`.
0 commit comments