buildScheme returns a minimal runtime.Scheme for tests: core v1 and the DWO API types.
()
| 46 | |
| 47 | // buildScheme returns a minimal runtime.Scheme for tests: core v1 and the DWO API types. |
| 48 | func buildScheme() *runtime.Scheme { |
| 49 | scheme := runtime.NewScheme() |
| 50 | Expect(corev1.AddToScheme(scheme)).To(Succeed()) |
| 51 | Expect(dwv2.AddToScheme(scheme)).To(Succeed()) |
| 52 | Expect(controllerv1alpha1.AddToScheme(scheme)).To(Succeed()) |
| 53 | return scheme |
| 54 | } |
| 55 | |
| 56 | // makeWorkspace returns a minimal DevWorkspace in the given namespace. |
| 57 | func makeWorkspace(namespace string) *dwv2.DevWorkspace { |