@@ -63,6 +63,17 @@ var _ = Describe("Snapshot Tests", func() {
63
63
var (
64
64
deployWorkloads = func (securityContext * core.SecurityContext ) []testResources {
65
65
var resources []testResources
66
+ //// Deploy a DaemonSet
67
+ //dmn, err := f.DeployDaemonSet(framework.SourceDaemonSet, framework.SourceVolume, func(dmn *apps.DaemonSet) {
68
+ // dmn.Spec.Template.Spec.Containers[0].SecurityContext = securityContext
69
+ //})
70
+ //Expect(err).NotTo(HaveOccurred())
71
+ //
72
+ //// Generate Sample Data
73
+ //_, err = f.GenerateSampleData(dmn.ObjectMeta, apis.KindDaemonSet)
74
+ //Expect(err).NotTo(HaveOccurred())
75
+ //resources = append(resources, testResources{workloadMeta: dmn.ObjectMeta, workloadKind: apis.KindDaemonSet, workload: dmn})
76
+
66
77
// Deploy a Deployment
67
78
deployment , err := f .DeployDeployment (framework .SourceDeployment , int32 (1 ), framework .SourceVolume , func (dp * apps.Deployment ) {
68
79
dp .Spec .Template .Spec .Containers [0 ].SecurityContext = securityContext
@@ -74,27 +85,16 @@ var _ = Describe("Snapshot Tests", func() {
74
85
Expect (err ).NotTo (HaveOccurred ())
75
86
resources = append (resources , testResources {workloadMeta : deployment .ObjectMeta , workloadKind : apis .KindDeployment , workload : deployment })
76
87
77
- //// Deploy a StatefulSet
78
- //ss, err := f.DeployStatefulSet(framework.SourceStatefulSet, int32(3), framework.SourceVolume, func(ss *apps.StatefulSet) {
79
- // ss.Spec.Template.Spec.Containers[0].SecurityContext = securityContext
80
- //})
81
- //Expect(err).NotTo(HaveOccurred())
82
- //
83
- //// Generate Sample Data
84
- //_, err = f.GenerateSampleData(ss.ObjectMeta, apis.KindStatefulSet)
85
- //Expect(err).NotTo(HaveOccurred())
86
- //resources = append(resources, testResources{workloadMeta: ss.ObjectMeta, workloadKind: apis.KindStatefulSet, workload: ss})
87
-
88
- // Deploy a DaemonSet
89
- dmn , err := f .DeployDaemonSet (framework .SourceDaemonSet , framework .SourceVolume , func (dmn * apps.DaemonSet ) {
90
- dmn .Spec .Template .Spec .Containers [0 ].SecurityContext = securityContext
88
+ // Deploy a StatefulSet
89
+ ss , err := f .DeployStatefulSet (framework .SourceStatefulSet , int32 (2 ), framework .SourceVolume , func (ss * apps.StatefulSet ) {
90
+ ss .Spec .Template .Spec .Containers [0 ].SecurityContext = securityContext
91
91
})
92
92
Expect (err ).NotTo (HaveOccurred ())
93
93
94
94
// Generate Sample Data
95
- _ , err = f .GenerateSampleData (dmn .ObjectMeta , apis .KindDaemonSet )
95
+ _ , err = f .GenerateSampleData (ss .ObjectMeta , apis .KindStatefulSet )
96
96
Expect (err ).NotTo (HaveOccurred ())
97
- resources = append (resources , testResources {workloadMeta : dmn .ObjectMeta , workloadKind : apis .KindDaemonSet , workload : dmn })
97
+ resources = append (resources , testResources {workloadMeta : ss .ObjectMeta , workloadKind : apis .KindStatefulSet , workload : ss })
98
98
99
99
return resources
100
100
}
0 commit comments