Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
0679bafa
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
0679bafa
编写于
1月 30, 2019
作者:
C
Caio Carrara
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'clebergnu/copr_fixes'
Signed-off-by:
N
Caio Carrara
<
ccarrara@redhat.com
>
上级
47fff314
7c67cc73
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
14 deletion
+10
-14
optional_plugins/varianter_yaml_to_mux/setup.py
optional_plugins/varianter_yaml_to_mux/setup.py
+1
-10
python-avocado.spec
python-avocado.spec
+4
-0
selftests/unit/test_utils_vmimage.py
selftests/unit/test_utils_vmimage.py
+5
-4
未找到文件。
optional_plugins/varianter_yaml_to_mux/setup.py
浏览文件 @
0679bafa
...
...
@@ -13,18 +13,9 @@
# Copyright: Red Hat Inc. 2017
# Author: Cleber Rosa <crosa@redhat.com>
import
sys
from
setuptools
import
setup
,
find_packages
INSTALL_REQUIREMENTS
=
[
'avocado-framework'
]
if
sys
.
version_info
[
0
]
==
2
:
INSTALL_REQUIREMENTS
.
append
(
'PyYAML>=3.10'
)
else
:
INSTALL_REQUIREMENTS
.
append
(
'PyYAML>=4.2b2'
)
setup
(
name
=
'avocado-framework-plugin-varianter-yaml-to-mux'
,
description
=
'Avocado Varianter plugin to parse YAML file into variants'
,
version
=
open
(
"VERSION"
,
"r"
).
read
().
strip
(),
...
...
@@ -33,7 +24,7 @@ setup(name='avocado-framework-plugin-varianter-yaml-to-mux',
url
=
'http://avocado-framework.github.io/'
,
packages
=
find_packages
(
exclude
=
(
'tests*'
,)),
include_package_data
=
True
,
install_requires
=
INSTALL_REQUIREMENTS
,
install_requires
=
(
'avocado-framework'
,
'PyYAML>=4.2b2'
)
,
test_suite
=
'tests'
,
entry_points
=
{
"avocado.plugins.cli"
:
[
...
...
python-avocado.spec
浏览文件 @
0679bafa
...
...
@@ -214,6 +214,10 @@ sed -e "s/'libvirt-python'//" -i optional_plugins/runner_vm/setup.py
%
build
%
if
0
%{?
rhel
}
==
7
sed
-
e
"s/'six>=1.10.0'/'six>=1.9.0'/"
-
i
setup
.
py
sed
-
e
"s/'PyYAML>=4.2b2'/'PyYAML>=3.10'/"
-
i
optional_plugins
/
varianter_yaml_to_mux
/
setup
.
py
%
endif
%
if
0
%{?
fedora
}
&&
0
%{?
fedora
}
<
29
sed
-
e
"s/'PyYAML>=4.2b2'/'PyYAML>=3.12'/"
-
i
optional_plugins
/
varianter_yaml_to_mux
/
setup
.
py
%
endif
%
py2_build
%
if
%{
with_python3
}
...
...
selftests/unit/test_utils_vmimage.py
浏览文件 @
0679bafa
...
...
@@ -133,13 +133,13 @@ class OpenSUSEImageProvider(unittest.TestCase):
def
test_get_best_version_default
(
self
):
suse_latest_version
=
15.0
suse_provider
=
vmimage
.
OpenSUSEImageProvider
()
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
arch
=
'x86_64'
)
self
.
assertEqual
(
suse_provider
.
get_best_version
(
self
.
suse_available_versions
),
suse_latest_version
)
def
test_get_best_version_leap_4_series
(
self
):
suse_latest_version
=
42.3
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
version
=
'4(.)*'
)
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
version
=
'4(.)*'
,
arch
=
'x86_64'
)
self
.
assertEqual
(
suse_provider
.
get_best_version
(
self
.
suse_available_versions
),
suse_latest_version
)
...
...
@@ -151,7 +151,7 @@ class OpenSUSEImageProvider(unittest.TestCase):
urlopen_mock
.
return_value
=
mock
.
Mock
(
read
=
urlread_mocked
)
expected_image_url
=
self
.
base_images_url
+
image
suse_provider
=
vmimage
.
OpenSUSEImageProvider
()
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
arch
=
'x86_64'
)
suse_provider
.
get_version
=
mock
.
Mock
(
return_value
=
'15.0'
)
self
.
assertEqual
(
suse_provider
.
get_image_url
(),
expected_image_url
)
...
...
@@ -163,7 +163,8 @@ class OpenSUSEImageProvider(unittest.TestCase):
urlopen_mock
.
return_value
=
mock
.
Mock
(
read
=
urlread_mocked
)
expected_image_url
=
self
.
base_images_url
+
image
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
build
=
'1.1.1-Buildlp111.11.11'
)
suse_provider
=
vmimage
.
OpenSUSEImageProvider
(
build
=
'1.1.1-Buildlp111.11.11'
,
arch
=
'x86_64'
)
suse_provider
.
get_version
=
mock
.
Mock
(
return_value
=
'15.0'
)
self
.
assertEqual
(
suse_provider
.
get_image_url
(),
expected_image_url
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录