■ ■ ■ ■ ■ ■
server/tests-py/test_version.py
| skipped 19 lines |
20 | 20 | | if server_version == '12345': |
21 | 21 | | return |
22 | 22 | | |
23 | | - | # Grab the Git details so that we know why things changed. |
24 | | - | def error_message(): |
25 | | - | git_status = subprocess.run(['git', 'status', '--porcelain'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf8').stdout |
26 | | - | git_diff = subprocess.run(['git', 'diff-index', '-p', 'HEAD', '--'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, encoding='utf8').stdout |
27 | | - | return f'Version JSON:\n{version_json}\n\nGit status:\n{git_status}\n\nGit diff:{git_diff}\n' |
28 | | - | |
29 | | - | # The tree may be dirty because we're developing tests locally while |
30 | | - | # graphql-engine was built previously when tree was clean. If we're |
31 | | - | # modifying graphql-engine too then both of these will be tagged dirty, |
32 | | - | # since a rebuild would necessarily be forced: |
33 | | - | assert server_version in (hge_ctx.version, re.sub('-dirty$', '', hge_ctx.version)), error_message() |
34 | | - | |