Demo of LISAv3 using Pytest#1044
Closed
andyleejordan wants to merge 61 commits into
Closed
Conversation
This is a _working_ test.
Extend Fabric’s Connection class with a new (and simple) command “cat” which return the value of a remote file as a string. Setup a Config for the Connection when creating it that echoes every command, disables the stdin forwarding (since we’re running under Pytest), and fixes the PATH since the remote commands don’t run under a login shell.
Closed
This could be extended to instead deploy a host of the specified distro. Most likely we’ll want a command-line parameter that the fixture uses to create a Node with the given requirements, and then tests will be skipped if their requirements aren’t met. Further more, the mark here is very simple. It can instead take keyword arguments, which would map to our metadata.
As supplying types for these would be supremely annoying.
c778572 to
2f66cd6
Compare
squirrelsc
reviewed
Oct 12, 2020
squirrelsc
reviewed
Oct 13, 2020
67bc6df to
58e186f
Compare
eedfd94 to
5732fa9
Compare
eb0ddab to
a9e4aff
Compare
Tenacity’s `stop_after_delay` seems to get confused underneath pytest, applying the delay as a total to all code using it, meaning the last test `get_boot_diagnostics` started always failing due to being canceled. There appears to be a similar issue (though fixed) in the library for async functions, where the state on their `RetryState` object doesn’t get reset properly.
This reverts commit a9e4aff. The plugin is incompatible with class fixtures, so when the last test in a test class fails, the fixture is torn down (in this case, deleting the node) before the test is retried, which doesn’t work for us.
f2b497f to
03b1866
Compare
Note that `warn=True` causes timeouts to be ignored. On some images, the invoked program (it’s not even a shell) just hangs waiting for manual input. So we set a proper timeout.
They can serve completely different purposes. In this case, re-running the whole test and reporting it as a second test run.
245e4aa to
dadb205
Compare
This was referenced Oct 21, 2020
Member
Author
|
Replacing with a real PR and CI and such in #1065. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a proposed (and working) alternative design leveraging Pytest.