Fixes#1037.
envconfig can't actually support that use case, and because athens was
using the `default:` tag only for the port field, handling this manually
is the easiest and functional solution.
* rm TraceExporterURL and StatsExporter default vals
* add test
* fix test
* revert TraceExporterURL and StatsExporter changes
* improve test error msg
* ignore GoEnv since it's set in CI and dev differently
* Allow mgo.ParseURL to set [/database]
As per Michael's solution we need to be able to set the database from
either the parsed connection string, or fallback to athens if not set.
Signed-off-by: Chris M <me@christophermills.co.uk>
* Remove TimeoutDuration which was removed #928
Signed-off-by: Chris M <me@christophermills.co.uk>
* Correct conf_test to accommodate for changes
I'd missed out the addition of DefaultDBName from the test, this has now
been corrected
Signed-off-by: Chris M <me@christophermills.co.uk>
* Make sure gofmt runs automatically on this machine
Y'know simple stuff.
Signed-off-by: Chris M <me@christophermills.co.uk>
* extend filtering logic and configuration to include version lists
Module filtering is very useful, but many deployments will need to
satisfy even more granular constrainsts. Enterprises may need
approved lists specific down to the minor (or patch) version element.
Version filtering logic is similar to the module filtering, in that
it's a prefix match of the version requested against each entry in the
version filter list.
Closes#1045
* include version filtering in documentation with example
* allow filtering when version is missing
Endpoints that do not specify a version, such as "@v/list", only need
to be filtered by module rules.
* Added new cataloger interface
* Implementing catalog protocol
* Propagated to protocol and over
* First round of fixes
* S3 almost ready, need to be tested
* Going on with testing s3
* Better testing with s3
* Simplified catalog tests
* Preparing gcp tests to access a gcp instance
* Fixing initialization errors
* Removed some prints
* Gcp ready, to be tested
* Gcp working
* Aligned bucket mock to catalog method
* Switched res payload to json
* Added catalog method to all storage instances
* Added catalog method to unsupported storages
* Fixed with pool test
* Restored tests
* Fixed gcp constructor
* Implemented catalog for fs
* Removed trace
* E2e tests, fixed fs
* Fixed module name return value
* Added cataloger method to azure storage
* Added docs
* Changed pagesize parameter name
* Fixed gofmt error
* Added json tags to result. Fixed lint warning
* Removed extra line
* Changed not implemented error to http.KindNotImplemented
* Checking for inequality on results
* Lower-cased json keys
* Added cleaning of path separator
* Fixed review comments
* Add catalog endpoint for mongo
* Add omitempty to ID
* Fix catalog tests
* update for next token
* fix e2e
* Make query readable
* Fix language and e2e script
* remove new line
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* refactoring code to improve HTTP status code
* File permissions on config files allow more restrictive setting
* Make the tests a bit more readable
* Bring back the tests dude
* Update error message
* remove else
* Add more test cases
* Change Lstat to Stat
* Add note for umask
* Make sure the permissions are 0600 or lower
* Update config file
* Do not check for windows
* Fix CI errors
* Fix CI test
* Added new cataloger interface
* Implementing catalog protocol
* Propagated to protocol and over
* First round of fixes
* S3 almost ready, need to be tested
* Going on with testing s3
* Better testing with s3
* Simplified catalog tests
* Preparing gcp tests to access a gcp instance
* Fixing initialization errors
* Removed some prints
* Gcp ready, to be tested
* Gcp working
* Aligned bucket mock to catalog method
* Switched res payload to json
* Added catalog method to all storage instances
* Added catalog method to unsupported storages
* Fixed with pool test
* Restored tests
* Fixed gcp constructor
* Implemented catalog for fs
* Removed trace
* E2e tests, fixed fs
* Fixed module name return value
* Added cataloger method to azure storage
* Added docs
* Changed pagesize parameter name
* Fixed gofmt error
* Added json tags to result. Fixed lint warning
* Removed extra line
* Changed not implemented error to http.KindNotImplemented
* Checking for inequality on results
* Lower-cased json keys
* Added cleaning of path separator
* Fixed review comments
* Fixed docs
* Add check if GCP bucket exists, Remove bucket creation
* Update GCP section in Storage Configuration docs
* Add more explicit info if bucket not exists
* Remove inefficient assignment of variable cxt in pkg/storage/fs
* Remove inefficient assignment of variable cxt in pkg/storage/minio
* Remove inefficient assignment of variable cxt in pkg/storage/mongo
* Fix commonly misspelled English words successfully and accessible
* Remove inefficient assignment of variable cxt in pkg/download
* Remove inefficient assignment of variable cxt in pkg/module
* Add missing error checks in a few unit-test files
* Revert removal of inefficient assignment of variable cxt
The variable, although is not being used, it maintains the readability
in the functions where it’s being assigned. The removal of `cxt` in
these files may introduce errors when a new function taking these
values is called. Two other contributors agree that it’s easy to miss
this detail when passing the variable to other functions and the traces
are not being recorded.
* Modify unit-test error reporting for the config package
* Modify config test to exit when ioutil.TempFile or os.Chmod fail
* add logs
* apples and oranges
* apples and oranges
* Fix bug
* stringify mode
* fix stuff
* figure out why chmod does not work
* see what happens outside the temp folder
* Does it have a long path
* check if proper runtimes are called
* Skip tests for windows
* clean up
* Set up CI with Azure Pipelines
* trial & error
* use robocopy
* fix slash
* handle robocopy exit code
* rm goroot
* build proxy
* build & test proxy
* Skip Test_checkFilePerms on Win until issue resolved
* start minio and mongo
* do not create a new network on win 2016
* use win docker img for mongo
* download and start minio since there is no win docker img
* fix minio download & exec
* add minio access key and secret
* use new mongodb img
* fix docker-compose mongo
* trying to fix mongo tests
* ipconfig
* lets try that
* use docker inspect to get the container ip
* echo mongo container ip
* debuging docker inspect ipaddress
* set mongo env var to internal addr
* debug
* quotation is difficult
* without docker
* pass db dir
* split steps
* add some echos to know what takes so long
* cleanup
* add downloadURL var for minio and mongo
* rm windows docker compose file