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

WIP: Test scale out for tenant #19

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Sanity/scale_test/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/attestation-operator-tests/Sanity/scale_test
# Description: Scale functionality of the attesation operator
# Author: Patrik Koncity <[email protected]>
# Author: Sergio Arroutbi <[email protected]>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

export TEST=/CoreOS/attestation-operator-tests/Sanity/deployment_test
export TESTVERSION=1.0

.PHONY: all

all:
./runtest.sh
23 changes: 23 additions & 0 deletions Sanity/scale_test/main.fmf
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
summary: Scale test of attestation operator
description: ''
contact: Sergio Arroutbi <[email protected]>
component:
- attestation-operator
test: ./runtest.sh
recommend:
- attestation-operator
duration: 5m
enabled: true
tag:
- NoRHEL6
- NoRHEL7
- NoRHEL8
- Tier3
tier: '3'
adjust:
- enabled: false
when: distro < rhel-9
continue: false
- enabled: false
when: distro == rhel-alt-7
continue: false
42 changes: 42 additions & 0 deletions Sanity/scale_test/runtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/attestation-operator/Sanity/deployment_test
# Description: Basic deployment test for attestation operator
# Author: Sergio Arroutbi <[email protected]>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2023 Red Hat, Inc.
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 2 of
# the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
. ../../common-envvars.sh
TIMEOUT_POD_KEEPS_RUNNING=10

rlJournalStart
########## SCALE OUT TESTS #########
rlPhaseStartTest "Scale out keylime tenant"
rlRun 'rlImport "common-cloud-orchestration/TestHelpers"' || rlDie "cannot import function script"
rlRun "ocpopCheckAtLeastPodAmount 4 ${TIMEOUT_POD_START} ${OPERATOR_NAMESPACE}" 0 "Checking 4 PODs are started [Timeout=${TIMEOUT_POD_START} secs.]"
rlPhaseEnd
######### /DEPLOYMENT TESTS ########

rlJournalPrintText
rlJournalEnd