Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase coverage on integration tests #120

Merged
merged 9 commits into from
May 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "Testy McTestFace"
git config --global url.ssh://[email protected]/.insteadOf https://github.com/
go test -v -tags test -coverprofile=coverage.out ./...
go get -u github.com/ory/go-acc
go-acc --ignore fluxopsfakes -o coverage.out ./... -- -v -tags test
- name: Show coverage
run: go tool cover -func coverage.out
- name: Convert coverage.out to coverage.lcov
Expand Down
2 changes: 1 addition & 1 deletion test/acceptance/test/core_operations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,5 +229,5 @@ func deleteRepos(t *testing.T) {
}

func checkInitialStatus(t *testing.T) {
require.Equal(t, status.GetClusterStatus(), status.Unmodified)
require.Equal(t, status.Unmodified, status.GetClusterStatus())
}
12 changes: 12 additions & 0 deletions test/acceptance/test/utils_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package acceptance

import (
"testing"

"github.com/stretchr/testify/require"
)

func TestFileExists(t *testing.T) {
require.True(t, FileExists("utils_test.go"))
require.False(t, FileExists("imaginaryfile.txt"))
}