Skip to content

Commit 213d98b

Browse files
committed
fix integration tests for taskcluster-client.py>=7.0.0 and slugid>=2.0.0
1 parent d216c9d commit 213d98b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

requirements/base.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ json-e>=2.5.0
99
pexpect
1010
python-gnupg
1111
PyYAML
12-
taskcluster>=4
12+
taskcluster>=7
1313
wheel

scriptworker/test/test_integration.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def read_integration_creds():
6464

6565

6666
def build_config(override, basedir):
67-
randstring = slugid.nice()[0:6].decode('utf-8')
67+
randstring = slugid.nice()[0:6]
6868
config = get_unfrozen_copy(DEFAULT_CONFIG)
6969
GPG_HOME = os.path.join(os.path.dirname(__file__), "data", "gpg")
7070
ED25519_DIR = os.path.join(os.path.dirname(__file__), "data", "ed25519")
@@ -165,8 +165,8 @@ async def remember_cwd():
165165
@pytest.mark.parametrize("context_function", [get_context, get_temp_creds_context])
166166
@pytest.mark.asyncio
167167
async def test_run_successful_task(context_function):
168-
task_id = slugid.nice().decode('utf-8')
169-
task_group_id = slugid.nice().decode('utf-8')
168+
task_id = slugid.nice()
169+
task_group_id = slugid.nice()
170170
async with context_function(None) as context:
171171
result = await create_task(context, task_id, task_group_id)
172172
assert result['status']['state'] == 'pending'
@@ -183,7 +183,7 @@ async def test_run_successful_task(context_function):
183183
@pytest.mark.parametrize("context_function", [get_context, get_temp_creds_context])
184184
@pytest.mark.asyncio
185185
async def test_run_maxtimeout(context_function):
186-
task_id = slugid.nice().decode('utf-8')
186+
task_id = slugid.nice()
187187
partial_config = {
188188
'task_max_timeout': 2,
189189
'task_script': ('bash', '-c', '>&2 echo bar && echo foo && sleep 30 && exit 1'),
@@ -220,7 +220,7 @@ async def run_task_until_stopped(context):
220220
@pytest.mark.skipif(os.environ.get("NO_TESTS_OVER_WIRE"), reason=SKIP_REASON)
221221
@pytest.mark.asyncio
222222
async def test_cancel_task():
223-
task_id = slugid.nice().decode('utf-8')
223+
task_id = slugid.nice()
224224
partial_config = {
225225
'invalid_reclaim_status': 19,
226226
'task_script': ('bash', '-c', '>&2 echo bar && echo foo && sleep 30 && exit 1'),
@@ -263,7 +263,7 @@ async def do_shutdown(context):
263263
@pytest.mark.skipif(os.environ.get("NO_TESTS_OVER_WIRE"), reason=SKIP_REASON)
264264
@pytest.mark.asyncio
265265
async def test_shutdown():
266-
task_id = slugid.nice().decode('utf-8')
266+
task_id = slugid.nice()
267267
partial_config = {
268268
'task_script': ('bash', '-c', '>&2 echo running task script && sleep 30 && exit 1'),
269269
}
@@ -426,7 +426,7 @@ async def verify_cot(name, task_id, task_type):
426426
@pytest.mark.parametrize("context_function", [get_context, get_temp_creds_context])
427427
@pytest.mark.asyncio
428428
async def test_private_artifacts(context_function):
429-
task_group_id = task_id = slugid.nice().decode('utf-8')
429+
task_group_id = task_id = slugid.nice()
430430
override = {
431431
'task_script': (
432432
'bash', '-c',

0 commit comments

Comments
 (0)