Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .openshift-ci/ci_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,15 @@ def run(self):
["qa-tests-backend/scripts/run-part-2.sh"], QaE2eTestPart2.TEST_TIMEOUT
)

class QaE2eTestCompatibility(BaseTest):
TEST_TIMEOUT = 240 * 60

def run(self):
print("Executing qa-tests-compatibility tests")

self.run_with_graceful_kill(
["qa-tests-backend/scripts/run-compatibility.sh"], QaE2eTestCompatibility.TEST_TIMEOUT
)

class QaE2eDBBackupRestoreTest(BaseTest):
TEST_TIMEOUT = 30 * 60
Expand Down
30 changes: 30 additions & 0 deletions .openshift-ci/compatibility_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env -S python3 -u

"""
Run compatibility tests against a given cluster.
"""

from pre_tests import PreSystemTests
from ci_tests import QaE2eTestCompatibility
from post_tests import PostClusterTest, CheckStackroxLogs, FinalPost
from runners import ClusterTestSetsRunner

def make_compatibility_test_runner(cluster):
return ClusterTestSetsRunner(
cluster=cluster,
sets=[
{
"name": "version compatibility tests",
"pre_test": PreSystemTests(),
"test": QaE2eTestCompatibility(),
"post_test": PostClusterTest(
check_stackrox_logs=True,
artifact_destination_prefix="compatibility",
),
},
],
final_post=FinalPost(
store_qa_test_debug_logs=True,
store_qa_spock_results=True,
),
)
9 changes: 6 additions & 3 deletions qa-tests-backend/src/test/groovy/AutocompleteTest.groovy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import groups.BAT
import groups.COMPATIBILITY
import io.stackrox.proto.api.v1.SearchServiceOuterClass
import io.stackrox.proto.api.v1.SearchServiceOuterClass.RawSearchRequest
import io.stackrox.proto.api.v1.SearchServiceOuterClass.SearchCategory
Expand All @@ -15,7 +14,9 @@ class AutocompleteTest extends BaseSpecification {

private static final String GROUP_AUTOCOMPLETE = isPostgresRun() ? "GROUP" : "group"

@Category([BAT, COMPATIBILITY])
// TODO(ROX-13271): Investigate why AutocompleteTests fail with older Sensor versions and maybe fix it
// Re-Add COMPATIBILITY tag here
@Category([BAT])
def "Verify Autocomplete: #query #category #contains"() {
when:
SearchServiceOuterClass.AutocompleteResponse resp = SearchService.autocomplete(
Expand All @@ -40,7 +41,9 @@ class AutocompleteTest extends BaseSpecification {
}

@Unroll
@Category([BAT, COMPATIBILITY])
// TODO(ROX-13271): Investigate why AutocompleteTests fail with older Sensor versions and maybe fix it
// Re-Add COMPATIBILITY tag here
@Category([BAT])
def "Verify #category search options contains #options"() {
when:
def resp = SearchService.options(category)
Expand Down
17 changes: 17 additions & 0 deletions scripts/ci/jobs/gke_version_compatibility_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,22 @@
"""
Run version compatibility tests
"""
import os
from compatibility_test import make_compatibility_test_runner
from clusters import GKECluster

# set required test parameters
os.environ["ORCHESTRATOR_FLAVOR"] = "k8s"

# don't use postgres
os.environ["ROX_POSTGRES_DATASTORE"] = "false"

versions=["3.71.0", "3.70.0", "3.69.0"]

gkecluster=GKECluster("qa-e2e-test")

for version in versions:
os.environ["SENSOR_IMAGE_TAG"] = version
make_compatibility_test_runner(cluster=gkecluster).run()

print("stub for version compatibility tests")