Skip to content

IMDS Mock Server Testing #1108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Sep 28, 2022
Merged

Conversation

vector-of-bool
Copy link
Contributor

This is a follow-up to #1104. This changeset introduces automated testing of the IMDS server via CTest test fixtures. CTest will handle spawning and stopping the IMDS server as it is needed for executing tests. The fake_azure.py script was cleaned up for older Python compatibility in anticipation of sharing with other driver codebases and other platforms.

Copy link
Collaborator

@kevinAlbs kevinAlbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not familiar with ctest fixtures. I left some questions, but this looks good overall.

I encountered an unexplained error running locally, and left a comment with the traceback.

@@ -26,6 +26,12 @@ endif ()
# Split lines on newlines
string (REPLACE "\n" ";" lines "${tests_out}")

# XXX: Allow individual test cases to specify the fixtures they want.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does the XXX mean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've use this convention as a weaker form of "TODO". Some editors will mark it as such an annotation. I'm fine to change it, since it isn't obvious what it means.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO, or another alternative may be preferable. This is the first I have seen of XXX.

- Better handling of subcommand parsing
- Sleep a bit while waiting
- "Atomic" file write/removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants