Skip to content

Commit

Permalink
style: update migration docs urls to include new /migration/ path (#572)
Browse files Browse the repository at this point in the history
Co-authored-by: conors_ow <[email protected]>
  • Loading branch information
ConorSheehan1 and conorsheehan-ow authored Nov 5, 2021
1 parent 2a94fb0 commit b3897ed
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/guides/error-warning-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Example:
```txt
Incorrect State for operation: "${gotState}", allowed States: "[${wantedStates.join(',')}]"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything
```

Details:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,45 @@ exports[`MongoMemoryReplSet getters & setters setter of "replSetOpts" should thr
exports[`MongoMemoryReplSet getters & setters state errors setter of "binaryOpts" should throw an error if state is not "stopped" 1`] = `
"Incorrect State for operation: \\"init\\", allowed States: \\"[stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryReplSet getters & setters state errors setter of "instanceOpts" should throw an error if state is not "stopped" 1`] = `
"Incorrect State for operation: \\"init\\", allowed States: \\"[stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryReplSet getters & setters state errors setter of "replSetOpts" should throw an error if state is not "stopped" 1`] = `
"Incorrect State for operation: \\"init\\", allowed States: \\"[stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`single server replset "_initReplSet" should throw an error if _state is not "init" 1`] = `
"Incorrect State for operation: \\"running\\", allowed States: \\"[init]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`single server replset "_initReplSet" should throw if server count is 0 or less 1`] = `"One or more servers are required."`;

exports[`single server replset "getUri" should throw an error if _state is not "running" or "init" 1`] = `
"Incorrect State for operation: \\"stopped\\", allowed States: \\"[running,init]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`single server replset "new" should throw an error if replSet count is 0 or less 1`] = `"ReplSet Count needs to be 1 or higher! (specified count: \\"0\\")"`;

exports[`single server replset "start" should throw an error if _state is not "stopped" 1`] = `
"Incorrect State for operation: \\"running\\", allowed States: \\"[stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`single server replset "waitUntilRunning" should throw an error if _state is not "init" 1`] = `
"Incorrect State for operation: \\"stopped\\", allowed States: \\"[running,init]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exports[`MongoMemoryServer "createAuth" should throw an error if called without
exports[`MongoMemoryServer cleanup() should throw an error if state is not "stopped" 1`] = `
"Incorrect State for operation: \\"new\\", allowed States: \\"[stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryServer ensureInstance() should throw an error if "instanceInfo" is undefined but "_state" is "running" 1`] = `"{\\"isRunning\\":true,\\"message\\":\\"\\\\\\"ensureInstance\\\\\\" failed, because state was \\\\\\"running\\\\\\" but \\\\\\"instanceInfo\\\\\\" was undefined!\\"}"`;
Expand All @@ -15,31 +15,31 @@ exports[`MongoMemoryServer ensureInstance() should throw an error if no "instanc
exports[`MongoMemoryServer ensureInstance() should throw an error if the given "_state" has no case 1`] = `
"Incorrect State for operation: \\"not Existing\\", allowed States: \\"[running,new,stopped,starting]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryServer getUri() should throw an state error, if not starting or running 1`] = `
"Incorrect State for operation: \\"new\\", allowed States: \\"[running,starting]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryServer getUri() should throw an state error, if not starting or running 2`] = `
"Incorrect State for operation: \\"new\\", allowed States: \\"[running,starting]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryServer start() "createAuth" should not be called if "disabled" is true 1`] = `"Unauthorized"`;

exports[`MongoMemoryServer start() should throw an error if state is not "new" or "stopped" 1`] = `
"Incorrect State for operation: \\"starting\\", allowed States: \\"[new,stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;

exports[`MongoMemoryServer start() should throw an error if state is not "new" or "stopped" 2`] = `
"Incorrect State for operation: \\"running\\", allowed States: \\"[new,stopped]\\"
This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:
https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything"
`;
2 changes: 1 addition & 1 deletion packages/mongodb-memory-server-core/src/util/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export class StateError extends Error {
','
)}]"\n` +
'This may be because of using a v6.x way of calling functions, look at the following guide if anything applies:\n' +
'https://nodkz.github.io/mongodb-memory-server/docs/guides/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything'
'https://nodkz.github.io/mongodb-memory-server/docs/guides/migration/migrate7#no-function-other-than-start-create-ensureinstance-will-be-starting-anything'
);
}
}
Expand Down

0 comments on commit b3897ed

Please sign in to comment.