Skip to content

Commit 330e5d2

Browse files
gururajshmoleskea-bccjaimesMarcPaquette
authored
main: Update ginkgo version to v2 (#2810)
Use ginkgo v2 * Add user agent info for plugin api calls - Newer lager was needed with newer diego-ssh * Replace depracted ginkgo calls with non deprecated calls * Remove ACK_GINKGO_RC * Desperate attempt at resolving output issue by using serial decorator and using non deprecated pty * Turn off Gingkno v2 parallel mode * Adjust integration tests to use ginkgo v2 * Add Byte to lograte, disk and memory regexes used by int tests --------- Co-authored-by: Shwetha Gururaj <[email protected]> Co-authored-by: M. Oleske <[email protected]> Co-authored-by: Al Berez <[email protected]> Co-authored-by: Cristhian Peña <[email protected]> Co-authored-by: Marc Paquette <[email protected]> Co-authored-by: David Alvarado <[email protected]>
1 parent f209445 commit 330e5d2

File tree

1,235 files changed

+1344
-1429
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,235 files changed

+1344
-1429
lines changed

.github/win/integrations/integration-tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $Env:RUN_ID=(openssl rand -hex 16)
4949
$Env:GOFLAGS = "-mod=mod"
5050

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

5555
$CF_INT_NAME=(Get-Content $pwd\metadata.json -Raw| Out-String | ConvertFrom-Json).name.trim()

.github/workflows/tests-integration-reusable.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
sleep 30
113113
done
114114
cat metadata.json | jq -r '.name'
115-
115+
116116
- name: Install Tools
117117
run: |
118118
if [[ ${{ inputs.os }} =~ "windows" ]]
@@ -240,7 +240,7 @@ jobs:
240240
241241
make build
242242
243-
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
243+
go install github.com/onsi/ginkgo/v2/ginkgo
244244
245245
export CF_PASSWORD=${CF_INT_PASSWORD}
246246
cf api ${CF_INT_API} --skip-ssl-validation
@@ -270,7 +270,7 @@ jobs:
270270
271271
make build
272272
273-
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
273+
go install github.com/onsi/ginkgo/v2/ginkgo
274274
275275
export CF_PASSWORD=${CF_INT_PASSWORD}
276276
cf api ${CF_INT_API} --skip-ssl-validation

.github/workflows/tests-unit.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ jobs:
6767

6868
- name: Set Up Test
6969
run: |
70-
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
70+
go install github.com/onsi/ginkgo/v2/ginkgo
7171
go install github.com/onsi/gomega/matchers
7272
7373
- name: Run Units
7474
run: make units
75-
env:
76-
ACK_GINKGO_RC: true
7775

7876
units-windows:
7977
name: Units Windows
@@ -100,16 +98,14 @@ jobs:
10098

10199
- name: Set up Test
102100
run: |
103-
go install github.com/onsi/ginkgo/ginkgo@v1.16.4
101+
go install github.com/onsi/ginkgo/v2/ginkgo
104102
go install github.com/onsi/gomega/matchers
105103
106104
- name: Get build-time dependencies
107105
run: |
108106
choco install --no-progress --limit-output -y make
109107
110108
- name: Run Windows Units
111-
env:
112-
ACK_GINKGO_RC: true
113109
run: |
114110
Get-Command make
115111
Get-Item Makefile

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ REQUIRED_FOR_STATIC_BINARY =-a -tags "netgo" -installsuffix netgo
1616
GOSRC = $(shell find . -name "*.go" ! -name "*test.go" ! -name "*fake*" ! -path "./integration/*")
1717
UNAME_S := $(shell uname -s)
1818

19-
SLOW_SPEC_THRESHOLD=120
19+
POLL_PROGRESS_THRESHOLD=120s
2020

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

25-
GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomizeSuites -p
25+
GINKGO_UNITS_FLAGS = $(GINKGO_FLAGS) -randomize-suites
2626
ginkgo_units = ginkgo $(GINKGO_UNITS_FLAGS)
2727
GOFLAGS := -mod=mod
2828

@@ -138,9 +138,9 @@ integration-full-tests: integration-tests-full
138138
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
139139

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

145145
lint: custom-lint ## Runs all linters and formatters
146146
@echo "Running linters..."
@@ -200,22 +200,22 @@ test: units ## (synonym for units)
200200
units: units-full ## (synonym for units-full)
201201

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

205205
ifeq ($(OS),Windows_NT)
206206
units-non-plugin:
207207
@rm -f $(wildcard fixtures/plugins/*.exe)
208208
@ginkgo version
209209
CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \
210-
-skipPackage integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword
211-
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh
210+
-skip-package integration,cf\ssh,plugin,cf\actors\plugin,cf\commands\plugin,cf\actors\plugin,util\randomword
211+
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh
212212
else
213213
units-non-plugin:
214214
@rm -f $(wildcard fixtures/plugins/*.exe)
215215
@ginkgo version
216216
CF_HOME=$(CURDIR)/fixtures CF_USERNAME="" CF_PASSWORD="" $(ginkgo_units) \
217-
-skipPackage integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword
218-
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flakeAttempts 3 cf/ssh
217+
-skip-package integration,cf/ssh,plugin,cf/actors/plugin,cf/commands/plugin,cf/actors/plugin,util/randomword
218+
CF_HOME=$(CURDIR)/fixtures $(ginkgo_units) -flake-attempts 3 cf/ssh
219219
endif
220220

221221
units-full: build units-plugin units-non-plugin

actor/actionerror/actionerror_suite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package actionerror_test
33
import (
44
"testing"
55

6-
. "github.com/onsi/ginkgo"
6+
. "github.com/onsi/ginkgo/v2"
77
. "github.com/onsi/gomega"
88
)
99

actor/actionerror/duplicate_service_error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package actionerror_test
22

33
import (
44
"code.cloudfoundry.org/cli/actor/actionerror"
5-
. "github.com/onsi/ginkgo"
5+
. "github.com/onsi/ginkgo/v2"
66
. "github.com/onsi/gomega"
77
)
88

actor/actionerror/duplicate_service_plan_error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package actionerror_test
22

33
import (
44
"code.cloudfoundry.org/cli/actor/actionerror"
5-
. "github.com/onsi/ginkgo"
5+
. "github.com/onsi/ginkgo/v2"
66
. "github.com/onsi/gomega"
77
)
88

actor/actionerror/enrich_api_errors_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

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

10-
. "github.com/onsi/ginkgo"
10+
. "github.com/onsi/ginkgo/v2"
1111
. "github.com/onsi/gomega"
1212
)
1313

actor/actionerror/package_not_found_in_app_error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package actionerror_test
22

33
import (
44
"code.cloudfoundry.org/cli/actor/actionerror"
5-
. "github.com/onsi/ginkgo"
5+
. "github.com/onsi/ginkgo/v2"
66
. "github.com/onsi/gomega"
77
)
88

actor/actionerror/route_not_found_error_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package actionerror_test
22

33
import (
44
"code.cloudfoundry.org/cli/actor/actionerror"
5-
. "github.com/onsi/ginkgo"
5+
. "github.com/onsi/ginkgo/v2"
66
. "github.com/onsi/gomega"
77
)
88

0 commit comments

Comments
 (0)