Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

US-624029 : SSL and NIST SP 800-53 and NIST SP 800-131 support for Clustering Service #794

Merged
merged 13 commits into from
Dec 9, 2024
Merged
Prev Previous commit
Next Next commit
Merge branch 'master' into US-624029
  • Loading branch information
vnihal72 authored Nov 4, 2024
commit 332530638279a6e3e0569bc8ee2a8db6ac192bbd
39 changes: 34 additions & 5 deletions terratest/src/test/pega/pega-tier-deployment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func TestPegaTierDeploymentWithHazelcastSSL(t *testing.T) {
}
}

func assertStreamWithSorageClass(t *testing.T, streamYaml string, options *helm.Options) {
/*func assertStreamWithSorageClass(t *testing.T, streamYaml string, options *helm.Options) {
var statefulsetObj appsv1beta2.StatefulSet
UnmarshalK8SYaml(t, streamYaml, &statefulsetObj)
require.Equal(t, statefulsetObj.ObjectMeta.Name, getObjName(options, "-stream"))
Expand Down Expand Up @@ -145,6 +145,36 @@ func TestPegaTierDeploymentWithPodAffinity(t *testing.T) {
}
}

func TestPegaTierDeploymentWithTCPProbe(t *testing.T) {

var supportedVendors = []string{"k8s", "eks", "gke", "aks", "pks"}
helmChartPath, err := filepath.Abs(PegaHelmChartPath)
require.NoError(t, err)

var depObj appsv1.Deployment

for _, vendor := range supportedVendors {
var options = &helm.Options{
SetValues: map[string]string{
"global.provider": vendor,
"global.actions.execute": "deploy",
"global.deployment.name": "pega",
"global.tier[0].name": "web",
"global.tier[0].tcpKeepAliveProbe": "10",
},
}

yamlContent := RenderTemplate(t, options, helmChartPath, []string{"templates/pega-tier-deployment.yaml"})
yamlSplit := strings.Split(yamlContent, "---")

UnmarshalK8SYaml(t, yamlSplit[1], &depObj)
require.Equal(t, "net.ipv4.tcp_keepalive_time", *&depObj.Spec.Template.Spec.SecurityContext.Sysctls[0].Name)
require.Equal(t, "10", *&depObj.Spec.Template.Spec.SecurityContext.Sysctls[0].Value)

}

}

func TestPegaTierDeploymentWithFSGroup(t *testing.T) {
var supportedVendors = []string{"k8s", "eks", "gke", "aks", "pks"}
customFsGroups := map[string]int64{
Expand Down Expand Up @@ -183,13 +213,12 @@ func TestPegaTierDeploymentWithFSGroup(t *testing.T) {
}
}

func assertStreamWithHZSSL(t *testing.T, streamYaml string, options *helm.Options, hazelcastSSL bool) {
/*func assertStream(t *testing.T, streamYaml string, options *helm.Options) {
var statefulsetObj appsv1beta2.StatefulSet
UnmarshalK8SYaml(t, streamYaml, &statefulsetObj)
require.Equal(t, statefulsetObj.ObjectMeta.Name, getObjName(options, "-stream"))
VerifyPegaStatefulSet(t, &statefulsetObj, pegaDeployment{getObjName(options, "-stream"),
initContainers, "Stream", "900"}, options, hazelcastSSL)
}
VerifyPegaStatefulSet(t, &statefulsetObj, pegaDeployment{getObjName(options, "-stream"), initContainers, "Stream", "900"}, options)
}*/

func assertStream(t *testing.T, streamYaml string, options *helm.Options) {
assertStreamWithHZSSL(t, streamYaml, options, false)
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.