Skip to content

Commit

Permalink
Don't make fixed to v2, and run make generate
Browse files Browse the repository at this point in the history
v2 is frozen, we shouldn't update any of the templates there. Generate
testdata code for later use.
  • Loading branch information
jamielennox committed Nov 2, 2020
1 parent cf979c8 commit d1bf808
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ var _ = BeforeSuite(func(done Done) {
By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join({{ .CRDDirectoryRelativePath }}, "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}
var err error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ var _ = BeforeSuite(func(done Done) {
By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join({{ .CRDDirectoryRelativePath }}, "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join({{ .CRDDirectoryRelativePath }}, "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v3-addon/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v3-multigroup/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down
3 changes: 2 additions & 1 deletion testdata/project-v3/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ var _ = BeforeSuite(func(done Done) {

By("bootstrapping test environment")
testEnv = &envtest.Environment{
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
CRDDirectoryPaths: []string{filepath.Join("..", "config", "crd", "bases")},
ErrorIfCRDPathMissing: true,
}

var err error
Expand Down

0 comments on commit d1bf808

Please sign in to comment.