Skip to content

Commit 121070a

Browse files
committed
Test script file
1 parent 01e558e commit 121070a

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ services:
66
volumes:
77
- .:/code
88
working_dir: /code
9-
command: sh -c 'if gofmt -s -l . > /dev/null; then exit 1; fi; go test'
9+
command: sh /code/scripts/test.sh

scripts/test.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
6+
echo "Bad code format"
7+
exit 1
8+
fi
9+
10+
go test

server_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ func TestServer_On(t *testing.T) {
2525
expectedHandlerCount int
2626
}{
2727
{
28-
name: "No handlers",
29-
args: []args{},
28+
name: "No handlers",
29+
args: []args{},
3030
expectedHandlerCount: 0,
3131
},
3232
{

0 commit comments

Comments
 (0)