1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00

13 Commits

Author SHA1 Message Date
Aravinda VK
938cad228a Fix issue while doing gofmt tests
`gofmt` is returning zero even if format is not proper. Instead it
returns list of files which are not properly formatted.

This issue in golang repo suggested to use `test -z` for the same
https://github.com/golang/go/issues/24230

Signed-off-by: Aravinda VK <avishwan@redhat.com>
2018-09-24 14:12:00 +05:30
Michael Adam
9c3ae9ccbb test: add a "go vet" test
This is adopted from heketi.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 12:06:37 +02:00
Michael Adam
cf9ce745f8 test: don't use '-x' in shellcheck for now, so that centos-ci can pass
Apparently the centos version of shellcheck is too old to know '-x'.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 10:43:47 +02:00
Michael Adam
d8ef37316b test: add a test for shellscript correctness
This uses bash syntax validation and shellcheck.
Taken from heketi.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 10:34:31 +02:00
Michael Adam
f4469ba34d test: fix shebang in 020-golint.sh (found by shellcheck)
SC1113: Use #!, not just #, for the shebang.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 10:34:31 +02:00
Michael Adam
dad06fd702 test: fix possible splitting and globbing problems in the golint script
Found by shellcheck:
SC2086: Double quote to prevent globbing and word splitting.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 10:34:31 +02:00
Michael Adam
cd80497262 test: simplify the golint script a bit
Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
c5273678ce test: split gofmt test out of 020-golint.sh into its own script
At some point we might want to do something different
with gofmt compared to golint.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
57eea00513 test: move the script/lint-check.go to test/020-golint.sh
This removes the now-empty verify target.
The linting and formatting checks are now
at the 020 level in the test directory.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
149c822dc2 test: move gometalinter test into test-script
This test script is invoked by the test.sh runner,
so it can be removed from the verify target.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
d8eb6821b2 test: add test script for running unit tests
This new test script 100-gotest.sh, adopted from heketi,
replaces the original go test line from the "test" make target.

It has the capability of reacting to environment variables:
stopping as soon as an error is hit, creating test coverage
reports, etc.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
b9fd514f80 test: add test for makefile syntax check
This is a first Makefile test adopted from heketi
that will make sure that Makefile formatting stays
consistent wrt spaces and tabs.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 03:05:23 +02:00
Michael Adam
c3feb63be7 test: start adding new test infrastructure
This adds a ./test.sh base script as test runner that
will execute test scripts under ./test/ in order.
It adds one simple first test to test the test infra.

Signed-off-by: Michael Adam <obnox@redhat.com>
2018-04-24 02:58:25 +02:00