mirror of https://github.com/dirtbags/moth.git
Compare commits
7 Commits
2370fc6f23
...
e5b6bf487a
Author | SHA1 | Date |
---|---|---|
John Donaldson | e5b6bf487a | |
John Donaldson | b01a500189 | |
John Donaldson | e00ee97a98 | |
John Donaldson | 5720961e85 | |
John Donaldson | 466de2d9c6 | |
John Donaldson | 92d904150a | |
John Donaldson | 9783f99a39 |
|
@ -11,8 +11,14 @@ test:
|
||||||
- main
|
- main
|
||||||
- merge_requests
|
- merge_requests
|
||||||
script:
|
script:
|
||||||
- go test -race ./...
|
- go test -coverprofile=coverage.txt -covermode=atomic -race ./...
|
||||||
|
- go get github.com/boumenot/gocover-cobertura
|
||||||
|
- go run github.com/boumenot/gocover-cobertura < coverage.txt > coverage.xml
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
coverage_report:
|
||||||
|
coverage_format: cobertura
|
||||||
|
path: coverage.xml
|
||||||
push:
|
push:
|
||||||
stage: push
|
stage: push
|
||||||
rules:
|
rules:
|
||||||
|
|
|
@ -627,8 +627,32 @@ func TestStateTeamIDs(t *testing.T) {
|
||||||
t.Errorf("Expected to find 0 team ID, found %d (%s), instead", len(teamIDs), teamIDs)
|
t.Errorf("Expected to find 0 team ID, found %d (%s), instead", len(teamIDs), teamIDs)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestStateDeleteTeamIDList(t *testing.T) {
|
||||||
|
s := NewTestState()
|
||||||
|
s.refresh()
|
||||||
|
|
||||||
|
s.Fs.Remove("teamids.txt")
|
||||||
|
|
||||||
|
teamIDs, err := s.TeamIDs()
|
||||||
|
|
||||||
|
if len(teamIDs) != 0 {
|
||||||
|
t.Errorf("Expected to find 0 team IDs, found %d (%s), instead", len(teamIDs), teamIDs)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err == nil {
|
||||||
|
t.Errorf("Did not receive expected error for non-existent teamids.txt")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestStateTeamNames(t *testing.T) {
|
||||||
|
s := NewTestState()
|
||||||
|
s.refresh()
|
||||||
|
|
||||||
|
if teamNames := s.TeamNames(); len(teamNames) != 0 {
|
||||||
|
t.Errorf("Expected to find 0 registered teams, found %d (%s), instead", len(teamNames), teamNames)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestDevelState(t *testing.T) {
|
func TestDevelState(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue