testing fixes
This commit is contained in:
@@ -25,8 +25,9 @@ jobs:
|
|||||||
run: go build ./cmd/junk2jive
|
run: go build ./cmd/junk2jive
|
||||||
|
|
||||||
- name: Go Test
|
- name: Go Test
|
||||||
run: NONLOCAL_TESTS=1 go test ./... -v
|
run: go test ./... -v
|
||||||
|
|
||||||
- name: Coverage Test
|
- name: Coverage Test
|
||||||
run:
|
run: go test -coverprofile=coverage.out ./...
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
6
Makefile
6
Makefile
@@ -7,8 +7,8 @@ run:
|
|||||||
test:
|
test:
|
||||||
@go test ./... -v
|
@go test ./... -v
|
||||||
test_coverage:
|
test_coverage:
|
||||||
# @go test -cover ./...
|
@go test -cover ./...
|
||||||
@go test -coverprofile=coverage.out ./...
|
# @go test -coverprofile=coverage.out ./...
|
||||||
@go tool cover -func=coverage.out | grep total: | awk '{print "Total coverage: " $$3}'
|
# @go tool cover -func=coverage.out | grep total: | awk '{print "Total coverage: " $$3}'
|
||||||
clean:
|
clean:
|
||||||
@rm ./junk2jive
|
@rm ./junk2jive
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ func TestGetRouter(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestCoffeeEndpoint(t *testing.T) {
|
func TestCoffeeEndpoint(t *testing.T) {
|
||||||
origins := []string{"http://localhost:3000"}
|
origins := []string{"http://localhost:8080"}
|
||||||
r := SetupRouter(origins)
|
r := SetupRouter(origins)
|
||||||
|
|
||||||
// Create a test server
|
// Create a test server
|
||||||
|
|||||||
Reference in New Issue
Block a user