How to use the testinfra.Sink function in testinfra

To help you get started, we’ve selected a few testinfra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cockpit-project / cockpit / test / common / testimagetask.py View on Github external
"onaborted": {
                "github": {
                    "token": github.token,
                    "requests": [
                        # Post comment about failure
                        { "method": "POST",
                          "resource": ":issue.comments_url",
                          "data": {
                              "body": "Image creation aborted",
                          }
                        }
                    ]
                },
            }
        }
        self.sink = testinfra.Sink(host, identifier, status)
github cockpit-project / cockpit / test / common / testpulltask.py View on Github external
if self.name == "master" and prefix == "verify":
            status['irc'] = { }    # Only send to IRC when master
            status['badge'] = {
                'name': image,
                'description': image,
                'status': 'running'
            }
            status['onaborted']['badge'] = {
                'name': image,
                'description': image,
                'status': 'error'
            }

        # For other scripts to use
        os.environ["TEST_DESCRIPTION"] = description
        self.sink = testinfra.Sink(host, identifier, status)