Skip to content

Commit

Permalink
Adding scale tests label
Browse files Browse the repository at this point in the history
  • Loading branch information
ak-px committed Jul 24, 2024
1 parent ff8e95c commit ace950b
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,28 @@ spec:
values:
- postgres
topologyKey: "kubernetes.io/hostname"
initContainers:
- name: init-postgres-data
image: busybox
command: ["/bin/sh", "-c"]
args:
{{ if .ClaimsCount }}
{{- range $val := Iterate .ClaimsCount }}
- echo "Initializing data for postgredb-{{ $val }}"; dd if=/dev/zero of=/mnt/data{{ $val }}/initfile bs=1M count=10;
{{- end }}
{{ else }}
- echo "Initializing data for postgredb"; dd if=/dev/zero of=/mnt/data/initfile bs=1M count=10;
{{- end }}
volumeMounts:
{{ if .ClaimsCount }}
{{- range $val := Iterate .ClaimsCount }}
- name: postgredb-{{ $val }}
mountPath: /mnt/data{{ $val }}
{{- end }}
{{ else }}
- name: postgredb
mountPath: /mnt/data
{{- end }}
containers:
- name: postgres
image: postgres:9.5
Expand All @@ -45,14 +67,14 @@ spec:
value: /var/lib/postgresql/data/pgdata
volumeMounts:
{{ if .ClaimsCount }}
{{- range $val := Iterate .ClaimsCount }}
- name: postgredb-{{ $val }}
mountPath: /var/lib/postgresql/data{{ $val }}
{{- end }}
{{ else }}
- name: postgredb
mountPath: /var/lib/postgresql/data
{{- end }}
{{- range $val := Iterate .ClaimsCount }}
- name: postgredb-{{ $val }}
mountPath: /var/lib/postgresql/data{{ $val }}
{{- end }}
{{ else }}
- name: postgredb
mountPath: /var/lib/postgresql/data
{{- end }}
readinessProbe:
exec:
command: ["psql", "-U", "pgbench", "-c", "CREATE TABLE IF NOT EXISTS test_table ( test_text TEXT ); INSERT INTO test_table VALUES ( 'test_message' ); SELECT * FROM test_table; SELECT pg_sleep(1); DELETE FROM test_table;"]
Expand All @@ -64,14 +86,14 @@ spec:
initialDelaySeconds: 45
timeoutSeconds: 2
volumes:
{{ if .ClaimsCount }}
{{- range $val := Iterate .ClaimsCount }}
- name: postgredb-{{ $val }}
persistentVolumeClaim:
claimName: postgres-data-{{ $val }}
{{- end }}
{{- else }}
- name: postgredb
persistentVolumeClaim:
claimName: postgres-data
{{- end }}
{{ if .ClaimsCount }}
{{- range $val := Iterate .ClaimsCount }}
- name: postgredb-{{ $val }}
persistentVolumeClaim:
claimName: postgres-data-{{ $val }}
{{- end }}
{{- else }}
- name: postgredb
persistentVolumeClaim:
claimName: postgres-data
{{- end }}
15 changes: 10 additions & 5 deletions tests/backup/backup_test_labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ const (
SkipTestLabel = "skip-test"
)

// Scale test labels
const (
ScaleTestLabel = "Scale-test"
)

// Volume labels
const (
PortworxVolumeLabel = "portworx-volume"
Expand Down Expand Up @@ -410,7 +415,7 @@ var TestCaseLabelsMap = map[TestCaseName][]TestCaseLabel{
DuplicateSharedBackup: {DuplicateSharedBackupLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ibmNonPxIksPipelineS3Upgrade, ibmPxIksPipelineS3Upgrade, ocpPxPipelineS3Upgrade, ibmNonPxRoksPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
DifferentAccessSameUser: {DifferentAccessSameUserLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ibmNonPxIksPipelineS3Upgrade, ibmPxIksPipelineS3Upgrade, ocpPxPipelineS3Upgrade, ibmNonPxRoksPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
ShareBackupWithUsersAndGroups: {ShareBackupWithUsersAndGroupsLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ibmNonPxIksPipelineS3Upgrade, ibmPxIksPipelineS3Upgrade, ocpPxPipelineS3Upgrade, ibmNonPxRoksPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly},
ShareLargeNumberOfBackupsWithLargeNumberOfUsers: {ShareLargeNumberOfBackupsWithLargeNumberOfUsersLabel},
ShareLargeNumberOfBackupsWithLargeNumberOfUsers: {ShareLargeNumberOfBackupsWithLargeNumberOfUsersLabel, ScaleTestLabel},
CancelClusterBackupShare: {CancelClusterBackupShareLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ocpPxPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
ShareBackupAndEdit: {ShareBackupAndEditLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ibmNonPxIksPipelineS3Upgrade, ibmPxIksPipelineS3Upgrade, ocpPxPipelineS3Upgrade, ibmNonPxRoksPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly},
SharedBackupDelete: {SharedBackupDeleteLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3awsPXBackupupgrade, aetosl3awsstorkupgrade, aetosl3awsPXBackupStorkupgrade, aetosl3nfsrke, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, ibmNonPXIKSPipelineS3, ibmPxIKSPipelineS3, ibmNonPxRoksPipelineS3, ibmPxRoksPipelineS3, ibmNonPxIksPipelineS3Upgrade, ibmPxIksPipelineS3Upgrade, ocpPxPipelineS3Upgrade, ibmNonPxRoksPipelineS3Upgrade, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
Expand Down Expand Up @@ -484,7 +489,7 @@ var TestCaseLabelsMap = map[TestCaseName][]TestCaseLabel{
BackupNamespaceInNfsRestoredFromS3: {BackupNamespaceInNfsRestoredFromS3Label, aetosl3awsVanilla, aetosl3awsrke, aetosl3nfsrke, aetosl3nfsVanilla, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
DeleteS3ScheduleAndCreateNfsSchedule: {DeleteS3ScheduleAndCreateNfsScheduleLabel, aetosl3awsVanilla, aetosl3awsrke, aetosl3nfsrke, aetosl3nfsVanilla, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
KubeAndPxNamespacesSkipOnAllNSBackup: {KubeAndPxNamespacesSkipOnAllNSBackupLabel, aetosl3awsVanilla, aetosl3nfsVanilla, vanillaFacdPipelineS3, vanillaFacdPipelineNfs, vanillaFadaPipelineS3, vanillaFadaPipelineNfs, vanillaFBDAPipelineS3, vanillaFBDAPipelineNfs, vanillaPipelineS3Upgrade, VanillaPipelineS3StorkUpgrade, vanillaPipelineS3Nightly, vanillaPipelineNfsNightly},
MultipleBackupLocationWithSameEndpoint: {MultipleBackupLocationWithSameEndpointLabel},
MultipleBackupLocationWithSameEndpoint: {MultipleBackupLocationWithSameEndpointLabel, ScaleTestLabel},
UpgradePxBackup: {UpgradePxBackupLabel},
StorkUpgradeWithBackup: {StorkUpgradeWithBackupLabel},
PXBackupEndToEndBackupAndRestoreWithUpgrade: {PXBackupEndToEndBackupAndRestoreWithUpgradeLabel},
Expand All @@ -510,13 +515,13 @@ var TestCaseLabelsMap = map[TestCaseName][]TestCaseLabel{
DefaultBackupRestoreWithKubevirtAndNonKubevirtNS: {DefaultBackupRestoreWithKubevirtAndNonKubevirtNSLabel, KubevirtAppLabel},
KubevirtScheduledVMDelete: {KubevirtScheduledVMDeleteLabel, KubevirtAppLabel},
CustomBackupRestoreWithKubevirtAndNonKubevirtNS: {CustomBackupRestoreWithKubevirtAndNonKubevirtNSLabel, KubevirtAppLabel},
ExcludeInvalidDirectoryFileBackup: {ExcludeInvalidDirectoryFileBackupLabel},
ExcludeDirectoryFileBackup: {ExcludeDirectoryFileBackupLabel},
ExcludeInvalidDirectoryFileBackup: {ExcludeInvalidDirectoryFileBackupLabel, ScaleTestLabel},
ExcludeDirectoryFileBackup: {ExcludeDirectoryFileBackupLabel, ScaleTestLabel},
MultipleMemberProjectBackupAndRestoreForSingleNamespace: {MultipleMemberProjectBackupAndRestoreForSingleNamespaceLabel},
MultipleProvisionerCsiSnapshotDeleteBackupAndRestore: {MultipleProvisionerCsiSnapshotDeleteBackupAndRestoreLabel},
BackupNetworkErrorTest: {BackupNetworkErrorTestLabel},
IssueMultipleBackupsAndRestoreInterleavedCopies: {IssueMultipleBackupsAndRestoreInterleavedCopiesLabel},
ValidateFiftyVolumeBackups: {ValidateFiftyVolumeBackupsLabel},
ValidateFiftyVolumeBackups: {ValidateFiftyVolumeBackupsLabel, ScaleTestLabel},
PXBackupClusterUpgradeTest: {PXBackupClusterUpgradeTestLabel},
BackupToLockedBucketWithSharedObjects: {BackupToLockedBucketWithSharedObjectsLabel, vanillaPipelineWithS3LockedBucket},
RemoveJSONFilesFromNFSBackupLocation: {RemoveJSONFilesFromNFSBackupLocationLabel},
Expand Down

0 comments on commit ace950b

Please sign in to comment.