-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
648 additions
and
65,537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
221 changes: 44 additions & 177 deletions
221
products/jbrowse-cli/src/commands/__snapshots__/add-connection.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,204 +1,71 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`adds JBrowse1 connection from a url 1`] = ` | ||
{ | ||
"assemblies": [ | ||
{ | ||
"name": "testAssembly", | ||
"sequence": { | ||
"adapter": { | ||
"twoBitLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "test.2bit", | ||
}, | ||
"type": "testSeqAdapter", | ||
}, | ||
"trackId": "", | ||
"type": "testSequenceTrack", | ||
}, | ||
}, | ||
], | ||
"configuration": {}, | ||
"connections": [ | ||
{ | ||
"connectionId": "JBrowse1Connection-1", | ||
"dataDirLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "https://mysite.com/jbrowse/data", | ||
}, | ||
"name": "JBrowse1Connection-1", | ||
"type": "JBrowse1Connection", | ||
[ | ||
{ | ||
"connectionId": "JBrowse1Connection-1", | ||
"dataDirLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "https://mysite.com/jbrowse/data", | ||
}, | ||
], | ||
"defaultSession": { | ||
"name": "New Session", | ||
"name": "JBrowse1Connection-1", | ||
"type": "JBrowse1Connection", | ||
}, | ||
"tracks": [], | ||
} | ||
] | ||
`; | ||
|
||
exports[`adds a custom connection with user set fields 1`] = ` | ||
{ | ||
"assemblies": [ | ||
{ | ||
"name": "testAssembly", | ||
"sequence": { | ||
"adapter": { | ||
"twoBitLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "test.2bit", | ||
}, | ||
"type": "testSeqAdapter", | ||
}, | ||
"trackId": "", | ||
"type": "testSequenceTrack", | ||
}, | ||
}, | ||
], | ||
"configuration": {}, | ||
"connections": [ | ||
{ | ||
"assemblyNames": [ | ||
"testAssembly", | ||
], | ||
"connectionId": "newConnectionId", | ||
"locationType": "UriLocation", | ||
"name": "newName", | ||
"type": "newType", | ||
"url": { | ||
"uri": "https://mysite.com/custom", | ||
}, | ||
[ | ||
{ | ||
"assemblyNames": [ | ||
"testAssembly", | ||
], | ||
"connectionId": "newConnectionId", | ||
"locationType": "UriLocation", | ||
"name": "newName", | ||
"type": "newType", | ||
"url": { | ||
"uri": "https://mysite.com/custom", | ||
}, | ||
], | ||
"defaultSession": { | ||
"name": "New Session", | ||
}, | ||
"tracks": [], | ||
} | ||
] | ||
`; | ||
|
||
exports[`adds an UCSCTrackHubConnection connection from a url 1`] = ` | ||
{ | ||
"assemblies": [ | ||
{ | ||
"name": "testAssembly", | ||
"sequence": { | ||
"adapter": { | ||
"twoBitLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "test.2bit", | ||
}, | ||
"type": "testSeqAdapter", | ||
}, | ||
"trackId": "", | ||
"type": "testSequenceTrack", | ||
}, | ||
}, | ||
], | ||
"configuration": {}, | ||
"connections": [ | ||
{ | ||
"connectionId": "UCSCTrackHubConnection-1", | ||
"hubTxtLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "https://mysite.com/data/hub.txt", | ||
}, | ||
"name": "UCSCTrackHubConnection-1", | ||
"type": "UCSCTrackHubConnection", | ||
[ | ||
{ | ||
"connectionId": "UCSCTrackHubConnection-1", | ||
"hubTxtLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "https://mysite.com/data/hub.txt", | ||
}, | ||
], | ||
"defaultSession": { | ||
"name": "New Session", | ||
"name": "UCSCTrackHubConnection-1", | ||
"type": "UCSCTrackHubConnection", | ||
}, | ||
"tracks": [], | ||
} | ||
] | ||
`; | ||
|
||
exports[`fails if data directory is not an url 1`] = ` | ||
{ | ||
"code": undefined, | ||
"message": "The location provided is not a valid URL", | ||
"oclif": { | ||
"exit": 160, | ||
}, | ||
"skipOclifErrorHandling": undefined, | ||
"suggestions": undefined, | ||
} | ||
`; | ||
exports[`fails if data directory is not an url 1`] = `"The location provided is not a valid URL"`; | ||
|
||
exports[`fails if no config file 1`] = ` | ||
{ | ||
"code": undefined, | ||
"message": "Error: ENOENT: no such file or directory, open './config.json'", | ||
"oclif": { | ||
"exit": 40, | ||
}, | ||
"skipOclifErrorHandling": undefined, | ||
"suggestions": [ | ||
"Make sure the file "./config.json" exists or use --out to point to a directory with a config.json", | ||
"Run \`jbrowse add-assembly\` to create a config file", | ||
], | ||
} | ||
`; | ||
exports[`fails if no config file 1`] = `"Error: ENOENT: no such file or directory, open './config.json'"`; | ||
|
||
exports[`fails to add a duplicate connection 1`] = ` | ||
{ | ||
"code": undefined, | ||
"message": "Cannot add connection with id newConnectionId, a connection with that id already exists. | ||
Use --overwrite if you would like to replace the existing connection", | ||
"oclif": { | ||
"exit": 150, | ||
}, | ||
"skipOclifErrorHandling": undefined, | ||
"suggestions": undefined, | ||
} | ||
"Cannot add connection with id newConnectionId, a connection with that id already exists. | ||
Use --overwrite if you would like to replace the existing connection" | ||
`; | ||
|
||
exports[`fails when fetching from url fails 1`] = ` | ||
{ | ||
"code": undefined, | ||
"message": "Unable to fetch from URL, Error: Response returned with code 500", | ||
"oclif": { | ||
"exit": 170, | ||
}, | ||
"skipOclifErrorHandling": undefined, | ||
"suggestions": undefined, | ||
} | ||
`; | ||
exports[`fails when fetching from url fails 1`] = `"Unable to fetch from URL, Error: Response returned with code 500"`; | ||
|
||
exports[`overwrites an existing custom connection and does not check URL 1`] = ` | ||
{ | ||
"assemblies": [ | ||
{ | ||
"name": "testAssembly", | ||
"sequence": { | ||
"adapter": { | ||
"twoBitLocation": { | ||
"locationType": "UriLocation", | ||
"uri": "test.2bit", | ||
}, | ||
"type": "testSeqAdapter", | ||
}, | ||
"trackId": "", | ||
"type": "testSequenceTrack", | ||
}, | ||
}, | ||
], | ||
"configuration": {}, | ||
"connections": [ | ||
{ | ||
"connectionId": "newConnectionId", | ||
"locationType": "UriLocation", | ||
"name": "newConnectionId", | ||
"type": "custom", | ||
"url": { | ||
"uri": "https://mysite.com/custom", | ||
}, | ||
[ | ||
{ | ||
"connectionId": "newConnectionId", | ||
"locationType": "UriLocation", | ||
"name": "newConnectionId", | ||
"type": "custom", | ||
"url": { | ||
"uri": "https://mysite.com/custom", | ||
}, | ||
], | ||
"defaultSession": { | ||
"name": "New Session", | ||
}, | ||
"tracks": [], | ||
} | ||
] | ||
`; |
Oops, something went wrong.