Skip to content

Conversation

sebastien-rosset
Copy link

@sebastien-rosset sebastien-rosset commented Mar 18, 2017

This is an enhancement to the dbtest package.

  • Option to run the DB test instance:
    1. as a local process, assuming Mongo has been installed or
    2. run MongoDB within a Docker container. A pre-requisite is to install Docker on the machine where dbtest is running. When then mgo test is executed, dbtest pulls the mongo docker image from dockerhub if it is not already present locally.
  • When running the dbtest Mongo within a container, the UT can specify the MongoDB version to run. This makes it possible to run tests that require a specific MongoDB version, instead of whatever version has been installed in the OS.

@sebastien-rosset sebastien-rosset changed the title V2.1 Support running dbtest in Docker container Mar 18, 2017
sebastien-rosset and others added 22 commits March 24, 2017 07:35
…When the test instance runs as a container, returns the container name
…When the test instance runs as a container, returns the container name
…When the test instance runs as a container, returns the container name
sebastien-rosset and others added 30 commits May 11, 2019 16:05
- Marshal
  - if GetBSON() returned the same object it was passed, encode.go would turn around
    and call add*() function on that same object causing an infinite loop. Using
    NewContextWithSkipCustom() avoids infinite loop (avoids calling GetBSON() again).
    Returning the same object is useful in the case where GetBSON():
      - obtains bson.Raw from fields hidden (annotations) from the standard marshaler
      - sets bson.Raw fields visible (annotations) to the standard marshaler
      - returns the same object such that standard marshalling can occur
  - context.Context can be used to control how fields are marshaled

- Unmarshal
  - calling Unmarshal on the same object from SetBSON() would cause infinite loop
  - fix: pass bson.NewContextWithSkipCustom(ctx, obj) to UnmarshalWithContext()
  - context.Context can be used to control how fields are unmarshaled
… index only references documents that match the filter expression.
bson: add WithContext versions of API functions
Adding Support for Collation in Query
add check to determine if image exists locally before doing docker pull
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.

5 participants