mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 02:00:20 +00:00
add arm64 to _get_opt and SourceEntry.repo_line tests.
This commit is contained in:
parent
18cdcfc496
commit
66bb993cbd
1 changed files with 25 additions and 2 deletions
|
@ -30,6 +30,16 @@ def test__get_opts():
|
|||
"arch": {"full": "arch=amd64", "value": ["amd64"]},
|
||||
},
|
||||
},
|
||||
{
|
||||
"oneline": "deb [signed-by=/etc/apt/keyrings/example.key arch=arm64] https://example.com/pub/repos/apt xenial main",
|
||||
"result": {
|
||||
"signedby": {
|
||||
"full": "signed-by=/etc/apt/keyrings/example.key",
|
||||
"value": "/etc/apt/keyrings/example.key",
|
||||
},
|
||||
"arch": {"full": "arch=arm64", "value": ["arm64"]},
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
for test in tests:
|
||||
|
@ -59,6 +69,7 @@ def test_SourceEntry_repo_line():
|
|||
"deb [arch=amd64 signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=amd64,x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=arm64] https://example.com/pub/repos/apt xenial main\n",
|
||||
]
|
||||
for line in lines:
|
||||
source = SourceEntry(line, file="/tmp/test.list")
|
||||
|
@ -69,20 +80,32 @@ def test_SourceEntry_repo_line():
|
|||
(
|
||||
"deb [arch=amd64 signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [arch=x86_64 signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [arch=arm64 signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
),
|
||||
(
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=arm64] https://example.com/pub/repos/apt xenial main\n",
|
||||
),
|
||||
(
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=amd64,x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=arm64] https://example.com/pub/repos/apt xenial main\n",
|
||||
),
|
||||
(
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=amd64,x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=x86_64] https://example.com/pub/repos/apt xenial main\n",
|
||||
"deb [signed-by=/etc/apt/keyrings/example.key arch=arm64] https://example.com/pub/repos/apt xenial main\n",
|
||||
),
|
||||
]
|
||||
for line in lines:
|
||||
line_key, line_value = line
|
||||
line_key, line_value1, line_value2 = line
|
||||
source = SourceEntry(line_key, file="/tmp/test.list")
|
||||
source.architectures = ["x86_64"]
|
||||
assert source.invalid is False
|
||||
assert source.repo_line() == line_value
|
||||
assert source.repo_line() == line_value1
|
||||
assert source.invalid is False
|
||||
source.architectures = ["arm64"]
|
||||
assert source.invalid is False
|
||||
assert source.repo_line() == line_value2
|
||||
assert source.invalid is False
|
||||
|
|
Loading…
Add table
Reference in a new issue