Skip to content

[FIrestore Samples] Update tests to be self-contained and verified for correctness. #1788

Closed

Description

@frankyn

In which file did you encounter the issue?

https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/firestore/cloud-client/snippets_test.py

Describe the issue

Tests aren't self contained and also not being verified for correctness. At the moment, tests only run the samples and verify that they execute without failure. Although, tests do provide some level of support using this method, they aren't verifying state correctness of Firestore post after testing a given sample.

Activity

  1. added
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Oct 7, 2019
  2. gguuss commented on Oct 10, 2019

    @gguuss
    Contributor

    This may be fixed in the updated tests from @BenWhitehead.

  3. BenWhitehead commented on Oct 11, 2019

    @BenWhitehead
    Contributor

    There are a few older tests that need to have assertions added to them.

  4. self-assigned this
    on Dec 31, 2019
  5. crwilcox commented on Dec 31, 2019

    @crwilcox
    Contributor

    @BenWhitehead do we have the individual tests we should fix?

  6. BenWhitehead commented on Jan 2, 2020

    @BenWhitehead
    Contributor

    @crwilcox I think with your updated bootstrapping for the tests that should hopefully transparently take care of this.

    @frankyn Do you have specific tests that we should double check to make sure the fix from @crwilcox addresses things?

  7. andrewferlitsch commented on Mar 16, 2020

    @andrewferlitsch
    Contributor
  8. frankyn commented on Mar 17, 2020

    @frankyn
    ContributorAuthor

    Apologies, I missed this in email.

    The tests are not validating correctness and only making sure samples execute without failures.

    Here's an example of a test being verified: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/firestore/cloud-client/snippets_test.py#L74-L80

    Here's an example of test not being verified: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/firestore/cloud-client/snippets_test.py#L70-L71

  9. leahecole commented on May 14, 2020

    @leahecole
    Collaborator

    I've been in touch with @BenWhitehead recently, and it is still in the pipeline.

  10. removed their assignment
    on Feb 10, 2021
  11. meredithslota commented on Mar 7, 2023

    @meredithslota
    Contributor

    A partial fix was implemented in #2667 but work remains (see last comment from @frankyn).

  12. self-assigned this
    on Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: firestoreIssues related to the Firestore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions