|
| 1 | +/* |
| 2 | +Copyright 2023 Akamai Technologies, Inc. |
| 3 | +
|
| 4 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +you may not use this file except in compliance with the License. |
| 6 | +You may obtain a copy of the License at |
| 7 | +
|
| 8 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +
|
| 10 | +Unless required by applicable law or agreed to in writing, software |
| 11 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +See the License for the specific language governing permissions and |
| 14 | +limitations under the License. |
| 15 | +*/ |
| 16 | + |
| 17 | +package v1beta1 |
| 18 | + |
| 19 | +import ( |
| 20 | + . "github.com/onsi/ginkgo/v2" |
| 21 | + . "github.com/onsi/gomega" |
| 22 | + |
| 23 | + infrastructurev1beta1 "github.com/linode/cluster-api-provider-linode/api/v1beta1" |
| 24 | + // TODO (user): Add any additional imports if needed |
| 25 | +) |
| 26 | + |
| 27 | +var _ = Describe("LinodeCluster Webhook", func() { |
| 28 | + var ( |
| 29 | + obj *infrastructurev1beta1.LinodeCluster |
| 30 | + oldObj *infrastructurev1beta1.LinodeCluster |
| 31 | + ) |
| 32 | + |
| 33 | + BeforeEach(func() { |
| 34 | + obj = &infrastructurev1beta1.LinodeCluster{} |
| 35 | + oldObj = &infrastructurev1beta1.LinodeCluster{} |
| 36 | + Expect(oldObj).NotTo(BeNil(), "Expected oldObj to be initialized") |
| 37 | + Expect(obj).NotTo(BeNil(), "Expected obj to be initialized") |
| 38 | + // TODO (user): Add any setup logic common to all tests |
| 39 | + }) |
| 40 | + |
| 41 | + AfterEach(func() { |
| 42 | + // TODO (user): Add any teardown logic common to all tests |
| 43 | + }) |
| 44 | + |
| 45 | + Context("When creating LinodeCluster under Conversion Webhook", func() { |
| 46 | + // TODO (user): Add logic to convert the object to the desired version and verify the conversion |
| 47 | + // Example: |
| 48 | + // It("Should convert the object correctly", func() { |
| 49 | + // convertedObj := &infrastructurev1beta1.LinodeCluster{} |
| 50 | + // Expect(obj.ConvertTo(convertedObj)).To(Succeed()) |
| 51 | + // Expect(convertedObj).ToNot(BeNil()) |
| 52 | + // }) |
| 53 | + }) |
| 54 | + |
| 55 | +}) |
0 commit comments