Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ Unify the expected messages through redaction
Principled fix for the issue outlined in #975 The fundamental issue is that we check the output to validate that the script is behaving as expected. However, the script output can vary in different environments. We had originally handled this by having multiple expected output strings. But as we expand the scope of what we print out, the set of expected output strings expanded. Some of the strings also included paths, so had the username embedded, so would be hard to enumerate in the test. Those logs are also not critical to this test, which is focused on the response to various arguments passed in to the script. So we fix this by simply removing the parts that vary across environments, replacing them by `REDACTED`. As a bonus, this also allows us to collapse the previous two strings into one, and supports all three testing environments: (i) locally on laptop, (ii) locally in docker, and (iii) docker CI/CD (although (ii) is not really supported since it is not tested extensively). Testing done: ``` $ ./e-mission-py.bash emission/tests/storageTests/TestTokenQueries.py ---------------------------------------------------------------------- Ran 21 tests in 22.862s OK ```
- Loading branch information