Logo
Explore Help
Register Sign In
Mirrors/dokku
1
0
Fork 0
You've already forked dokku
mirror of https://github.com/dokku/dokku.git synced 2026-09-02 04:00:22 +02:00
Code Issues Packages Projects Releases Wiki Activity
Files
master
dokku/tests/apps/python/cron_task.py

17 lines
468 B
Python
Raw Permalink Normal View History

fix: stop logs tests leaking a global app-label-alias The `app-label-alias` test left the global property set, so every later test in the file generated a vector source filtering on a label that dokku never applies to a container, silently collecting nothing. Clearing it in teardown restores log collection for the rest of the file. The cron routing test now asserts against console sinks rather than files, since the sink an event reached is identifiable from vector's own output without depending on a writable host mount, and its task sleeps either side of its output because a cron container that exits immediately is removed before vector can attach to it.
2026-08-09 02:22:13 -04:00
import sys
import time
def main(args):
# a log shipper attaches to a container after it receives the start event,
# and a cron container is removed the moment it exits. sleep on either side
# of the output so that the shipper has time to attach before the line is
# written and time to read it before the container is gone.
time.sleep(5)
print(' '.join(args[1:]), flush=True)
time.sleep(3)
if __name__ == '__main__':
main(sys.argv)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 901ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API