Skip to content

Commit 222a061

Browse files
authored
CI/tests: update bats-*, remove bats-mock (#4172)
* CI/tests: update bats-*, remove bats-mock * remove reference to bats-mock * skip buggy bats-core 1.13 bats-core/bats-assert#91 * remove $FILE from test description * submodules: use upstream repo
1 parent 5fcc066 commit 222a061

File tree

8 files changed

+9
-21
lines changed

8 files changed

+9
-21
lines changed

.gitmodules

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
[submodule "tests/lib/bats-core"]
22
path = test/lib/bats-core
3-
url = https://github.com/crowdsecurity/bats-core.git
4-
branch = v1.7.0
3+
url = https://github.com/bats-core/bats-core.git
54
[submodule "tests/lib/bats-file"]
65
path = test/lib/bats-file
7-
url = https://github.com/crowdsecurity/bats-file.git
6+
url = https://github.com/bats-core/bats-file.git
87
[submodule "tests/lib/bats-assert"]
98
path = test/lib/bats-assert
10-
url = https://github.com/crowdsecurity/bats-assert.git
9+
url = https://github.com/bats-core/bats-assert.git
1110
[submodule "tests/lib/bats-support"]
1211
path = test/lib/bats-support
13-
url = https://github.com/crowdsecurity/bats-support.git
14-
[submodule "tests/lib/bats-mock"]
15-
path = test/lib/bats-mock
16-
url = https://github.com/crowdsecurity/bats-mock.git
12+
url = https://github.com/bats-core/bats-support.git

test/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ we use in this test suite:
111111
- [bats-assert](https://github.com/bats-core/bats-assert)
112112
- [bats-support](https://github.com/bats-core/bats-support)
113113
- [bats-file](https://github.com/bats-core/bats-file)
114-
- [bats-mock](https://github.com/grayhemp/bats-mock)
115114

116115
# setup and teardown
117116

@@ -305,12 +304,6 @@ We included the [bats-file](https://github.com/bats-core/bats-file) plugin to
305304
check the result of file system operations: existence, type/size/ownership checks
306305
on files, symlinks, directories, sockets.
307306

308-
## mocking external commands
309-
310-
The [bats-mock](https://github.com/grayhemp/bats-mock) plugin allows you to define
311-
a "fake" behavior for the external commands called by a package under test, and
312-
to record and assert which parameters are passed to it.
313-
314307
## gotchas
315308

316309
- pay attention to tests that are not run - for example "bats warning: Executed 143

test/bats/81_alert_context.bats

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ teardown() {
3030

3131
#----------
3232

33-
@test "$FILE 1.1.1.172 has context" {
33+
@test "1.1.1.172 has context" {
3434
tmpfile=$(TMPDIR="$BATS_TEST_TMPDIR" mktemp)
3535
touch "$tmpfile"
3636

test/lib/bats-core

Submodule bats-core updated 93 files

test/lib/bats-file

test/lib/bats-mock

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)