Skip to content

Commit

Permalink
Automated merge
Browse files Browse the repository at this point in the history
* upstream/main:
  Include integration tests in code coverage calculation (istio-ecosystem#427)
  Improve failure messages for supportedversion unit tests (istio-ecosystem#442)
  • Loading branch information
openshift-service-mesh-bot committed Oct 21, 2024
2 parents d3b4f6a + 9a048d9 commit 9e6c4d0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

- name: Run coverage
run: |
make test.unit \
make test \
-e COVERAGE=true
- name: Upload to Codecov
uses: codecov/codecov-action@v4
with:
file: out/coverage.out
files: out/coverage-unit.out,out/coverage-integration.out
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
fail_ci_if_error: true
4 changes: 2 additions & 2 deletions Makefile.core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ ENVTEST_K8S_VERSION ?= 1.29.0
# Set DOCKER_BUILD_FLAGS to specify flags to pass to 'docker build', default to empty. Example: --platform=linux/arm64
DOCKER_BUILD_FLAGS ?= "--platform=$(TARGET_OS)/$(TARGET_ARCH)"

GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage.out)
GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color)
GOTEST_FLAGS := $(if $(VERBOSE),-v) $(if $(COVERAGE),-coverprofile=$(REPO_ROOT)/out/coverage-unit.out)
GINKGO_FLAGS := $(if $(VERBOSE),-v) $(if $(CI),--no-color) $(if $(COVERAGE),-coverprofile=coverage-integration.out -coverpkg=./... --output-dir=out)

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down
10 changes: 5 additions & 5 deletions pkg/test/util/supportedversion/supportedversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (

func TestInit(t *testing.T) {
// no need to call init(), since it's called automatically
assert.True(t, len(List) > 0, "List should not be empty")
assert.True(t, len(Map) > 0, "M should not be empty")
assert.True(t, Default != "", "Default should not be empty")
assert.True(t, Old != "", "Default should not be empty")
assert.True(t, New != "", "Default should not be empty")
assert.True(t, len(List) > 0, "supportedversion.List should not be empty")
assert.True(t, len(Map) > 0, "supportedversion.Map should not be empty")
assert.True(t, Default != "", "supportedversion.Default should not be empty")
assert.True(t, Old != "", "supportedversion.Old should not be empty")
assert.True(t, New != "", "supportedversion.New should not be empty")

assert.Equal(t, len(List), len(Map), "Map should be same size as List")
for _, vi := range List {
Expand Down

0 comments on commit 9e6c4d0

Please sign in to comment.