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

v8: Update ginkgo version to v2 #2809

Merged
merged 10 commits into from
Mar 22, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/win/integrations/integration-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ $Env:RUN_ID=(openssl rand -hex 16)
$Env:GOFLAGS = "-mod=mod"

if ((Get-Command "ginkgo" -ErrorAction SilentlyContinue) -eq $null) {
go install -v github.com/onsi/ginkgo/ginkgo@v1.16.4
go install -v github.com/onsi/ginkgo/v2/ginkgo@latest
}

$CF_INT_NAME=(Get-Content $pwd\metadata.json -Raw| Out-String | ConvertFrom-Json).name.trim()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests-integration-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
sleep 30
done
cat metadata.json | jq -r '.name'

- name: Install Tools
run: |
if [[ ${{ inputs.os }} =~ "windows" ]]
Expand Down Expand Up @@ -240,7 +240,7 @@ jobs:

make build

go install github.com/onsi/ginkgo/ginkgo@v1.16.4
go install github.com/onsi/ginkgo/v2/ginkgo

export CF_PASSWORD=${CF_INT_PASSWORD}
cf api ${CF_INT_API} --skip-ssl-validation
Expand Down Expand Up @@ -270,7 +270,7 @@ jobs:

make build

go install github.com/onsi/ginkgo/ginkgo@v1.16.4
go install github.com/onsi/ginkgo/v2/ginkgo

export CF_PASSWORD=${CF_INT_PASSWORD}
cf api ${CF_INT_API} --skip-ssl-validation
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/tests-unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,11 @@ jobs:

- name: Set Up Test
run: |
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
go install github.com/onsi/ginkgo/v2/ginkgo
go install github.com/onsi/gomega/matchers

- name: Run Units
run: make units
env:
ACK_GINKGO_RC: true

units-windows:
name: Units Windows
Expand All @@ -100,16 +98,14 @@ jobs:

- name: Set up Test
run: |
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
go install github.com/onsi/ginkgo/v2/ginkgo
go install github.com/onsi/gomega/matchers

- name: Get build-time dependencies
run: |
choco install --no-progress --limit-output -y make

- name: Run Windows Units
env:
ACK_GINKGO_RC: true
run: |
Get-Command make
Get-Item Makefile
Expand Down
22 changes: 11 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ REQUIRED_FOR_STATIC_BINARY =-a -tags "netgo" -installsuffix netgo
GOSRC = $(shell find . -name "*.go" ! -name "*test.go" ! -name "*fake*" ! -path "./integration/*")
UNAME_S := $(shell uname -s)

SLOW_SPEC_THRESHOLD=120
POLL_PROGRESS_THRESHOLD=120s

GINKGO_FLAGS ?= -r -randomizeAllSpecs -requireSuite
GINKGO_INT_FLAGS = $(GINKGO_FLAGS) -slowSpecThreshold $(SLOW_SPEC_THRESHOLD)
GINKGO_FLAGS ?= -r -randomize-all -require-suite
GINKGO_INT_FLAGS = $(GINKGO_FLAGS) --poll-progress-after $(POLL_PROGRESS_THRESHOLD)
ginkgo_int = ginkgo $(GINKGO_INT_FLAGS)

GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomizeSuites -p
GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites
ginkgo_units = ginkgo $(GINKGO_UNITS_FLAGS)
GOFLAGS := -mod=mod

Expand Down Expand Up @@ -138,9 +138,9 @@ integration-full-tests: integration-tests-full
integration-tests-full: build integration-cleanup integration-isolated integration-push integration-experimental integration-plugin integration-global integration-selfcontained ## Run all isolated, push, experimental, plugin, selfcontained, and global integration tests

integration-tests-full-ci: integration-cleanup
$(ginkgo_int) -nodes $(NODES) -flakeAttempts $(FLAKE_ATTEMPTS) \
$(ginkgo_int) -nodes $(NODES) -flake-attempts $(FLAKE_ATTEMPTS) \
integration/shared/isolated integration/v7/isolated integration/shared/plugin integration/shared/experimental integration/v7/experimental integration/v7/push
$(ginkgo_int) -flakeAttempts $(FLAKE_ATTEMPTS) integration/shared/global integration/v7/global
$(ginkgo_int) -flake-attempts $(FLAKE_ATTEMPTS) integration/shared/global integration/v7/global

lint: custom-lint ## Runs all linters and formatters
@echo "Running linters..."
Expand Down Expand Up @@ -200,22 +200,22 @@ test: units ## (synonym for units)
units: units-full ## (synonym for units-full)

units-plugin:
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -nodes 1 -flakeAttempts 2 -skipPackage integration ./**/plugin* ./plugin
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -nodes 1 -flake-attempts 2 -skip-package integration ./**/plugin* ./plugin

ifeq ($(OS),Windows_NT)
units-non-plugin:
@rm -f $(wildcard fixtures/plugins/*.exe)
@ginkgo version
CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \
-skipPackage integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh
-skip-package integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh
else
units-non-plugin:
@rm -f $(wildcard fixtures/plugins/*.exe)
@ginkgo version
CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \
-skipPackage integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh
-skip-package integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh
endif

units-full: build units-plugin units-non-plugin
Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/actionerror_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package actionerror_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/duplicate_service_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/duplicate_service_plan_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/enrich_api_errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"code.cloudfoundry.org/cli/actor/actionerror"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/package_not_found_in_app_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/route_not_found_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/service_not_found_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/service_plan_not_found_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"

"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/actionerror/space_not_found_error_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package actionerror_test

import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/cfnetworkingaction/cfnetworkingaction_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cfnetworkingaction_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
2 changes: 1 addition & 1 deletion actor/cfnetworkingaction/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "code.cloudfoundry.org/cli/actor/cfnetworkingaction"
"code.cloudfoundry.org/cli/actor/cfnetworkingaction/cfnetworkingactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/checksum_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

. "code.cloudfoundry.org/cli/actor/pluginaction"
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/install_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"code.cloudfoundry.org/cli/api/plugin/pluginfakes"
"code.cloudfoundry.org/cli/util/configv3"
"code.cloudfoundry.org/cli/util/generic"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/install_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
. "code.cloudfoundry.org/cli/actor/pluginaction"
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
"code.cloudfoundry.org/cli/util/configv3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/install_windows_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

. "code.cloudfoundry.org/cli/actor/pluginaction"
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
"code.cloudfoundry.org/cli/api/plugin"
"code.cloudfoundry.org/cli/util/configv3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/plugin_info_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
"code.cloudfoundry.org/cli/api/plugin"
"code.cloudfoundry.org/cli/util/configv3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/plugin_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
"code.cloudfoundry.org/cli/api/plugin"
"code.cloudfoundry.org/cli/util/configv3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/pluginaction_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pluginaction_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
2 changes: 1 addition & 1 deletion actor/pluginaction/uninstall_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
. "code.cloudfoundry.org/cli/actor/pluginaction"
"code.cloudfoundry.org/cli/actor/pluginaction/pluginactionfakes"
"code.cloudfoundry.org/cli/util/configv3"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
3 changes: 1 addition & 2 deletions actor/sharedaction/check_target_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import (
"code.cloudfoundry.org/cli/actor/actionerror"
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/help_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/is_org_targeted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sharedaction_test
import (
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/is_space_targeted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package sharedaction_test
import (
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/logging_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
logcache "code.cloudfoundry.org/go-log-cache/v2"
"code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/resource_darwin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/resource_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
"code.cloudfoundry.org/ykk"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion actor/sharedaction/resource_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
. "code.cloudfoundry.org/cli/actor/sharedaction"
"code.cloudfoundry.org/cli/actor/sharedaction/sharedactionfakes"
"code.cloudfoundry.org/ykk"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
Loading
Loading