Skip to content

Conversation

@comandeo
Copy link
Contributor

This commit fixes an assumption that the spec is always executed on a
Linux machine.

This commit fixes an assumption that the spec is always executed on a
Linux machine.
@comandeo comandeo requested a review from p-mongo April 15, 2021 09:38
Copy link
Contributor

@p-mongo p-mongo left a comment

Choose a reason for hiding this comment

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

Unfortunately this test now lost all of the explicit assertions on what data is actually ending up in the metadata document. For example, if cpu/platform are empty it would still pass.

Can the original test be left as is and skipped if OS isn't linux and a new test be added which asserts specific values for mac instead?

@comandeo
Copy link
Contributor Author

We can do that; however, in this case we will have more or less same problems with architecture attribute. Ideally we need to create a test for every supported combination of OS/CPU type. I am not sure if it worth it, though.

My assumption was that we if RbConfig::CONFIG is not complete, there is not much we can do anyway, so we can rely on it. On the other hand, I do understand your reasons.

@p-mongo
Copy link
Contributor

p-mongo commented Apr 15, 2021

For now I think two cases would be sufficient: the existing one which works in Evergreen and hopefully on all of the (at least mainstream) linux distributions, and one which works on your machine which would hopefully work on all apple products.

@p-mongo
Copy link
Contributor

p-mongo commented Apr 15, 2021

I would also like to see the values that the driver will use for the metadata fields on apples, right now this isn't in the test.

@comandeo comandeo merged commit 18cad30 into mongodb:master Apr 19, 2021
@comandeo comandeo deleted the 2296-fix-app-metadata-spec branch April 19, 2021 07:05
comandeo pushed a commit that referenced this pull request Apr 20, 2021
RUBY-2296: Fix app metadata spec

This commit fixes an assumption that the spec is always executed on a
Linux machine.
comandeo pushed a commit that referenced this pull request Apr 20, 2021
RUBY-2296: Fix app metadata spec

This commit fixes an assumption that the spec is always executed on a
Linux machine.
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.

3 participants