Use upload artifact v4 (#6807)

unique-ify name

psh, who needs loops

Folder management

Extracts into current path

Co-authored-by: Alan Rominger <arominge@redhat.com>
This commit is contained in:
Peter Braun
2025-02-03 16:10:55 +01:00
committed by GitHub
parent 99b67f1e37
commit 18ea5cc561
7 changed files with 31 additions and 21 deletions

View File

@@ -832,7 +832,7 @@ class CredentialTypeInjectorField(JSONSchemaField):
'type': 'string',
# The environment variable _value_ can be any ascii,
# but pexpect will choke on any unicode
'pattern': '^[\x00-\x7F]*$',
'pattern': '^[\x00-\x7f]*$',
},
},
'additionalProperties': False,

View File

@@ -17,8 +17,8 @@ tables_to_drop = [
'djkombu_message',
'djkombu_queue',
]
postgres_sql = ([("DROP TABLE IF EXISTS {} CASCADE;".format(table))] for table in tables_to_drop)
sqlite_sql = ([("DROP TABLE IF EXISTS {};".format(table))] for table in tables_to_drop)
postgres_sql = (["DROP TABLE IF EXISTS {} CASCADE;".format(table)] for table in tables_to_drop)
sqlite_sql = (["DROP TABLE IF EXISTS {};".format(table)] for table in tables_to_drop)
class Migration(migrations.Migration):

View File

@@ -83,7 +83,7 @@ def test_ansi_stdout_filtering(sqlite_copy, Parent, Child, relation, view, downl
job = Parent()
job.save()
for i in range(3):
Child(**{relation: job, 'stdout': '\x1B[0;36mTesting {}\x1B[0m\n'.format(i), 'start_line': i}).save()
Child(**{relation: job, 'stdout': '\x1b[0;36mTesting {}\x1b[0m\n'.format(i), 'start_line': i}).save()
url = reverse(view, kwargs={'pk': job.pk})
# ansi codes in ?format=txt should get filtered
@@ -96,7 +96,7 @@ def test_ansi_stdout_filtering(sqlite_copy, Parent, Child, relation, view, downl
# ask for ansi and you'll get it
fmt = "?format={}".format("ansi_download" if download else "ansi")
response = get(url + fmt, user=admin, expect=200)
assert smart_str(response.content).splitlines() == ['\x1B[0;36mTesting %d\x1B[0m' % i for i in range(3)]
assert smart_str(response.content).splitlines() == ['\x1b[0;36mTesting %d\x1b[0m' % i for i in range(3)]
has_download_header = response.has_header('Content-Disposition')
assert has_download_header if download else not has_download_header
@@ -115,7 +115,7 @@ def test_colorized_html_stdout(sqlite_copy, Parent, Child, relation, view, get,
job = Parent()
job.save()
for i in range(3):
Child(**{relation: job, 'stdout': '\x1B[0;36mTesting {}\x1B[0m\n'.format(i), 'start_line': i}).save()
Child(**{relation: job, 'stdout': '\x1b[0;36mTesting {}\x1b[0m\n'.format(i), 'start_line': i}).save()
url = reverse(view, kwargs={'pk': job.pk}) + '?format=html'
response = get(url, user=admin, expect=200)

View File

@@ -118,8 +118,8 @@ class TestSmartFilterQueryFromString:
@pytest.mark.parametrize(
"filter_string,q_expected",
[
(u'(a=abc\u1F5E3def)', Q(**{u"a": u"abc\u1F5E3def"})),
(u'(ansible_facts__a=abc\u1F5E3def)', Q(**{u"ansible_facts__contains": {u"a": u"abc\u1F5E3def"}})),
(u'(a=abc\u1f5e3def)', Q(**{u"a": u"abc\u1f5e3def"})),
(u'(ansible_facts__a=abc\u1f5e3def)', Q(**{u"ansible_facts__contains": {u"a": u"abc\u1f5e3def"}})),
],
)
def test_unicode(self, mock_get_host_model, filter_string, q_expected):