-
Notifications
You must be signed in to change notification settings - Fork 282
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
feat: SUSE AI sanity test suite #20817
Merged
asmorodskyi
merged 1 commit into
os-autoinst:master
from
rqueiroz-suse:feature/suse-ai-sanity-test
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# SUSE's openQA tests | ||
# | ||
# Copyright 2024 SUSE LLC | ||
# SPDX-License-Identifier: FSFAP | ||
|
||
# Basic aistack test | ||
|
||
# Summary: This test performs the following actions | ||
# - Calls AI Stack sanity tests | ||
# Maintainer: Rhuan Queiroz <[email protected]> | ||
# | ||
|
||
use Mojo::Base 'publiccloud::basetest'; | ||
use strict; | ||
use warnings; | ||
use testapi; | ||
use utils; | ||
use publiccloud::utils; | ||
use version_utils; | ||
use transactional qw(process_reboot trup_install trup_shell trup_call); | ||
|
||
sub test_flags { | ||
return {fatal => 1, publiccloud_multi_module => 1}; | ||
} | ||
|
||
sub run { | ||
my ($self, $args) = @_; | ||
|
||
my $instance = $self->{my_instance}; | ||
my $provider = $self->{provider}; | ||
|
||
my $test_archive = get_required_var('OPENWEBUI_SANITY_TESTS_ARCHIVE'); | ||
my $sanity_tests_url = data_url("aistack/" . $test_archive); | ||
|
||
my $test_folder = $test_archive; | ||
$test_folder =~ s/\.tar(\.gz)?$//; | ||
|
||
assert_script_run("curl -O " . $sanity_tests_url); | ||
assert_script_run("mkdir " . $test_folder); | ||
assert_script_run("tar -xzvf " . $test_archive . " -C " . $test_folder); | ||
assert_script_run("python3.11 -m venv " . $test_folder . "/venv"); | ||
assert_script_run("source " . $test_folder . "/venv/bin/activate"); | ||
assert_script_run("pip3 install -r ./" . $test_folder . "/requirements.txt"); | ||
assert_script_run("cp " . $test_folder . "/env.example " . $test_folder . "/.env"); | ||
assert_script_run("pytest $test_folder/tests/"); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The virtualenv is never left, perhaps a |
||
|
||
1; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.