Skip to content

Commit d3862c7

Browse files
committed
Replace bats embed with bats-core submodule
Signed-off-by: Clarence "Sparr" Risher <[email protected]>
1 parent b1fdfe0 commit d3862c7

14 files changed

+28
-794
lines changed

Diff for: .gitattributes

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44
# Force the bash scripts to be checked out with LF line endings.
55
git-secrets text eol=lf
66
git-secrets.1 text eol=lf
7-
test/bats/bin/* text eol=lf
8-
test/bats/libexec/* text eol=lf
97
*.bats text eol=lf
108
*.bash text eol=lf

Diff for: .github/workflows/test.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ on:
55
push:
66
branches:
77
- 'master'
8-
pull_request: {}
8+
pull_request:
9+
workflow_dispatch:
910

1011
jobs:
1112
test:
1213
runs-on: ubuntu-latest
1314
steps:
1415
- uses: actions/checkout@v3
16+
with:
17+
submodules: true
1518
- run: make test

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test/bats-core"]
2+
path = test/bats-core
3+
url = https://github.com/bats-core/bats-core.git

Diff for: CONTRIBUTING.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ information to effectively respond to your bug report or contribution.
1111

1212
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
1313

14-
When filing an issue, please check [existing open](https://github.com/awslabs/git-secrets/issues), or [recently closed](https://github.com/awslabs/git-secrets/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
15-
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
14+
When filing an issue, please check [existing open](https://github.com/awslabs/git-secrets/issues), or [recently closed](https://github.com/awslabs/git-secrets/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
1615

1716
* A reproducible test case or series of steps
1817
* The version of our code being used
@@ -21,6 +20,7 @@ reported the issue. Please try to include as much information as you can. Detail
2120

2221

2322
## Contributing via Pull Requests
23+
2424
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
2525

2626
1. You are working against the latest source on the *master* branch.
@@ -41,16 +41,26 @@ GitHub provides additional document on [forking a repository](https://help.githu
4141

4242

4343
## Finding contributions to work on
44+
4445
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/awslabs/git-secrets/labels/help%20wanted) issues is a great place to start.
4546

4647

48+
## Testing
49+
50+
We use [bats-core](https://github.com/bats-core/bats-core) for testing. It is configured as a submodule of this repository, which will be checked out automatically by `make test` if necessary.
51+
52+
New functionality should include new tests. The existing tests in `test/*.bats` can be used as examples.
53+
54+
4755
## Code of Conduct
56+
4857
This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
4958
For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
5059
[email protected] with any additional questions or comments.
5160

5261

5362
## Security issue notifications
63+
5464
If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue.
5565

5666

Diff for: Makefile

+8-4
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,18 @@ help:
77
@echo " man to build the man file from README.rst"
88
@echo " install to install. Use PREFIX and MANPREFIX to customize."
99

10-
# We use bats for testing: https://github.com/sstephenson/bats
11-
test:
12-
LANG=C test/bats/bin/bats test/
10+
# We use bats-core for testing: https://github.com/bats-core/bats-core
11+
test: test/bats-core/bin/bats
12+
@LANG=C test/bats-core/bin/bats test/
13+
14+
test/bats-core/bin/bats:
15+
@git submodule init test/bats-core
16+
@git submodule update test/bats-core
1317

1418
# The man page is completely derived from README.rst. Edits to
1519
# README.rst require a rebuild of the man page.
1620
man:
17-
rst2man.py README.rst > git-secrets.1
21+
@rst2man.py README.rst > git-secrets.1
1822

1923
install:
2024
@mkdir -p ${DESTDIR}${MANPREFIX}

Diff for: NOTICE.txt

-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
11
git-secrets
22
Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3-
4-
bats
5-
This product bundles bats, which is available under a "MIT" license.
6-
For details, see test/bats.

Diff for: test/bats-core

Submodule bats-core added at 6636e2c

Diff for: test/bats/LICENSE

-20
This file was deleted.

Diff for: test/bats/bin/bats

-1
This file was deleted.

Diff for: test/bats/libexec/bats

-142
This file was deleted.

Diff for: test/bats/libexec/bats-exec-suite

-55
This file was deleted.

0 commit comments

Comments
 (0)