Separate generated test data from committed test data

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: All Tools

      Some of the tools tests have generated test data that gets put into the source directory next to committed test data. See this [mongorestore example](https://github.com/mongodb/mongo-tools/blob/0660bca4bee742d34d34c8cdbf91f4bb6ee552ba/mongorestore/metadata_test.go#L195-L203).

      To prevent this data from being committed, there are aggressive .gitignore rules to avoid committing json, which causes other json files (such as in vendor directories or newly added test data) not to be committed.

      We should consider options to better segregate generated from committed data. E.g.:

      • Only generate test data into a system temporary directory
      • Always generate test data into `testdata/generated` and restrict the .gitignore rules to that directory

            Assignee:
            Unassigned
            Reporter:
            David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: