Skip to content

Commit

Permalink
harmonize db name in tests/sample config files
Browse files Browse the repository at this point in the history
  • Loading branch information
feliixx committed Jul 26, 2021
1 parent aaeb9e1 commit 524bfba
Show file tree
Hide file tree
Showing 27 changed files with 425 additions and 425 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ and run
```
This will insert 1000 random documents in collections `test` and `link` of database
`datagen_it_test` with the structure defined in the config file.
`mgodatagen_test` with the structure defined in the config file.
# Generator types
Expand Down
4 changes: 2 additions & 2 deletions datagen/collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestParseConfig(t *testing.T) {
{
name: "invalid content",
configBytes: []byte(`[{
"database": "datagen_it_test",
"database": "mgodatagen_test",
"collection": "test",
"count": 1000,
"content": { "k": invalid }
Expand All @@ -59,7 +59,7 @@ func TestParseConfig(t *testing.T) {
{
name: "count > 0",
configBytes: []byte(`[{
"database": "datagen_it_test",
"database": "mgodatagen_test",
"collection": "test",
"count": 0,
"content": {}
Expand Down
8 changes: 4 additions & 4 deletions datagen/generators/aggregators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func TestAggregatorUpdate(t *testing.T) {
config: generators.Config{
Type: generators.TypeCountAggregator,
Collection: "test",
Database: "datagen_it_test",
Database: "mgodatagen_test",
Query: bson.M{
"local": "$$_id",
},
Expand All @@ -183,7 +183,7 @@ func TestAggregatorUpdate(t *testing.T) {
config: generators.Config{
Type: generators.TypeValueAggregator,
Collection: "test",
Database: "datagen_it_test",
Database: "mgodatagen_test",
Field: "_id",
Query: bson.M{
"local": "$$_id",
Expand All @@ -204,7 +204,7 @@ func TestAggregatorUpdate(t *testing.T) {
config: generators.Config{
Type: generators.TypeBoundAggregator,
Collection: "test",
Database: "datagen_it_test",
Database: "mgodatagen_test",
Field: "_id",
Query: bson.M{
"local": "$$_id",
Expand All @@ -224,7 +224,7 @@ func TestAggregatorUpdate(t *testing.T) {
config: generators.Config{
Type: generators.TypeCountAggregator,
Collection: "test",
Database: "datagen_it_test",
Database: "mgodatagen_test",
Query: bson.M{
"field": 1,
},
Expand Down
10 changes: 5 additions & 5 deletions datagen/generators/testdata/full-aggregation.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"database": "datagen_it_test",
"database": "mgodatagen_test",
"collection": "test",
"count": 10000,
"content": {
Expand Down Expand Up @@ -33,7 +33,7 @@
}
},
{
"database": "datagen_it_test",
"database": "mgodatagen_test",
"collection": "test_bson",
"count": 6,
"content": {
Expand All @@ -45,15 +45,15 @@
"AG-FI": {
"type": "countAggregator",
"collection": "test",
"database": "datagen_it_test",
"database": "mgodatagen_test",
"query": {
"link": "$$_id"
}
},
"AG-CI": {
"type": "boundAggregator",
"collection": "test",
"database": "datagen_it_test",
"database": "mgodatagen_test",
"field": "field1",
"query": {
"link": "$$_id"
Expand All @@ -62,7 +62,7 @@
"AG-VA": {
"type": "valueAggregator",
"collection": "test",
"database": "datagen_it_test",
"database": "mgodatagen_test",
"field": "field",
"query": {
"link": "$$_id"
Expand Down
2 changes: 1 addition & 1 deletion datagen/generators/testdata/full-bson.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"database": "datagen_it_test",
"database": "mgodatagen_test",
"collection": "test_bson",
"count": 1000,
"content": {
Expand Down
Loading

0 comments on commit 524bfba

Please sign in to comment.