@@ -17,26 +17,19 @@ limitations under the License.
1717package factory
1818
1919import (
20+ appsv1 "k8s.io/api/apps/v1"
2021 "k8s.io/apimachinery/pkg/api/resource"
2122 "k8s.io/utils/ptr"
2223
2324 . "github.com/onsi/ginkgo/v2"
2425 . "github.com/onsi/gomega"
25- . "sigs.k8s.io/controller-runtime/pkg/envtest/komega"
2626 corev1 "k8s.io/api/core/v1"
2727 metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
28- << << << < HEAD
2928 . "sigs.k8s.io/controller-runtime/pkg/envtest/komega"
3029
3130 etcdaenixiov1alpha1 "github.com/aenix-io/etcd-operator/api/v1alpha1"
3231 "github.com/google/uuid"
3332 "k8s.io/apimachinery/pkg/types"
34- == == == =
35-
36- etcdaenixiov1alpha1 "github.com/aenix-io/etcd-operator/api/v1alpha1"
37- "k8s.io/apimachinery/pkg/types"
38- "github.com/google/uuid"
39- >> >> >> > 641 ff74 (move reconcileOwnedResource to reconcile utils )
4033)
4134
4235var _ = Describe ("StatefulSet factory" , func () {
@@ -52,23 +45,14 @@ var _ = Describe("StatefulSet factory", func() {
5245 DeferCleanup (k8sClient .Delete , ns )
5346 })
5447
55- << << << < HEAD
5648 Context ("PodLabels" , func () {
5749 It ("should return base labels with custom labels merged" , func () {
5850 cluster := & etcdaenixiov1alpha1.EtcdCluster {
59- == == == =
60- Context ("when create statefulSet" , func () {
61- var etcdcluster etcdaenixiov1alpha1.EtcdCluster
62-
63- BeforeEach (func () {
64- etcdcluster = etcdaenixiov1alpha1.EtcdCluster {
65- >> >> >> > 641 ff74 (move reconcileOwnedResource to reconcile utils )
6651 ObjectMeta : metav1.ObjectMeta {
6752 Name : "test-cluster" ,
6853 },
6954 Spec : etcdaenixiov1alpha1.EtcdClusterSpec {},
7055 }
71- << << << < HEAD
7256
7357 cluster .Spec .PodTemplate .Labels = map [string ]string {
7458 "custom-label" : "value" ,
@@ -89,19 +73,6 @@ var _ = Describe("StatefulSet factory", func() {
8973 labels := PodLabels (cluster )
9074 Expect (labels ).Should (HaveLen (3 ))
9175 })
92- == == == =
93- Expect (k8sClient .Create (ctx , & etcdcluster )).Should (Succeed ())
94- Eventually (Get (& etcdcluster )).Should (Succeed ())
95- DeferCleanup (k8sClient .Delete , & etcdcluster )
96-
97- })
98- It ("should successfully create statefulSet object with empty spec" , func (){
99- statefulSetObj , err := GetStatefulSet (ctx , & etcdcluster , k8sClient )
100- Expect (err ).ShouldNot (HaveOccurred ())
101- Expect (statefulSetObj ).ShouldNot (BeNil ())
102- })
103-
104- >> >> >> > 641 ff74 (move reconcileOwnedResource to reconcile utils )
10576 })
10677
10778 Context ("GenerateEtcdArgs" , func () {
0 commit comments