-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #486 from oliverkurth/stable-3.5
bump version to 3.5.8
- Loading branch information
Showing
5 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
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
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,60 @@ | ||
# | ||
# Copyright (C) 2024 Broadcom, Inc. All Rights Reserved. | ||
# | ||
# Licensed under the GNU General Public License v2 (the "License"); | ||
# you may not use this file except in compliance with the License. The terms | ||
# of the License are located in the COPYING file of this distribution. | ||
# | ||
|
||
import os | ||
import shutil | ||
import pytest | ||
|
||
REPODIR = "/root/priority/repo" | ||
REPONAME = "priority-test" | ||
REPOFILENAME = f"{REPONAME}.repo" | ||
|
||
|
||
@pytest.fixture(scope='function', autouse=True) | ||
def setup_test(utils): | ||
|
||
os.makedirs(REPODIR, exist_ok=True) | ||
|
||
yield | ||
teardown_test(utils) | ||
|
||
|
||
def teardown_test(utils): | ||
if os.path.isdir(REPODIR): | ||
shutil.rmtree(REPODIR) | ||
filename = os.path.join(utils.config['repo_path'], "yum.repos.d", REPOFILENAME) | ||
if os.path.isfile(filename): | ||
os.remove(filename) | ||
|
||
|
||
def test_priority(utils): | ||
pkgname = utils.config['mulversion_pkgname'] | ||
pkgname_low = pkgname + "=" + utils.config['mulversion_lower'] | ||
ret = utils.run(["tdnf", | ||
"-y", "--nogpgcheck", | ||
"--downloadonly", f"--downloaddir={REPODIR}", | ||
"install", pkgname_low], | ||
) | ||
assert ret['retval'] == 0 | ||
|
||
ret = utils.run(["createrepo", "."], cwd=REPODIR) | ||
assert ret['retval'] == 0 | ||
|
||
filename = os.path.join(utils.config['repo_path'], "yum.repos.d", REPOFILENAME) | ||
baseurl = "file://{}".format(REPODIR) | ||
|
||
utils.create_repoconf(filename, baseurl, REPONAME) | ||
utils.edit_config({'priority': "25"}, repo=REPONAME) | ||
|
||
ret = utils.run(["tdnf", | ||
"-y", "--nogpgcheck", | ||
"install", pkgname], | ||
cwd=REPODIR) | ||
assert ret['retval'] == 0 | ||
|
||
utils.check_package(pkgname, version=utils.config['mulversion_lower']) |
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