Skip to content

Commit

Permalink
Merge pull request #2573 from mrkm4ntr/assign-config
Browse files Browse the repository at this point in the history
🐛 For go/v3 plugin: assign config to global config
  • Loading branch information
k8s-ci-robot authored Apr 1, 2022
2 parents 1fa0449 + 75a517b commit 472cc07
Show file tree
Hide file tree
Showing 23 changed files with 49 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ var _ = BeforeSuite(func(done Done) {
}
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: {{ .Resource.HasAPI }},
}
cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())
Expand Down
1 change: 1 addition & 0 deletions testdata/project-v2-addon/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
1 change: 1 addition & 0 deletions testdata/project-v2/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var _ = BeforeSuite(func(done Done) {
}

var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).ToNot(HaveOccurred())
Expect(cfg).ToNot(BeNil())
Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-addon/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-config/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: false,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-multigroup/controllers/fiz/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-multigroup/controllers/foo/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-multigroup/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3-v1beta1/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down
4 changes: 3 additions & 1 deletion testdata/project-v3/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ var _ = BeforeSuite(func() {
ErrorIfCRDPathMissing: true,
}

cfg, err := testEnv.Start()
var err error
// cfg is defined in this file globally.
cfg, err = testEnv.Start()
Expect(err).NotTo(HaveOccurred())
Expect(cfg).NotTo(BeNil())

Expand Down

0 comments on commit 472cc07

Please sign in to comment.