Commit Graph

258 Commits

Author SHA1 Message Date
Christopher Speller
1d419ff067 Bumping pre-packaged plugin versions. (#11651) 2019-07-19 07:33:58 -07:00
Harrison Healey
2bbfb1026d MM-16825 Update NPS plugin to 1.0.3 (#11664) 2019-07-19 08:55:40 +02:00
Harrison Healey
d4727ec649 Update NPS plugin to v1.0.2 (#11648) 2019-07-17 10:00:31 -07:00
Eli Yukelzon
f32679393b Added debug-server-headless to Makefile (#11625) 2019-07-17 14:36:58 +03:00
Max Vovshin
5015550f23 GH-11530 - Go major and minor version validation. (#11531)
* Added - golang version validation.

* Updated error message to include the minor version that is supported.

* Fixed issue with variable.

* Renamed variable.

* Added - golang version validation.

Added validation for major and minor versions of go.

* Fixed the way the validation is performed.

* Changed function declaration (define validate_go_version) to a target (validate_go_version).

* remove unneeded call to validate_go_version
2019-07-16 09:08:31 -04:00
Harrison Healey
673ed02a0d MM-16543 Fix Elasticsearch only returning one page of results (#11528)
* MM-16543 Add mocking for einterfaces packages

* MM-16543 Fix Elasticsearch only returning one page of results

* Remove license checks for einterface mocks
2019-07-08 08:32:29 -07:00
Claudio Costa
d844c52f06 MM-12389 Update segment library to v3 (#11472)
* Update analytics-go dependency

* Migrate from segment library v2 to v3

* Reinclude gorilla/handlers module

* Fix missing module

* Remove reference to outdated analytics module
2019-07-04 12:26:41 -07:00
Harrison Healey
0b89aa2472 MM-16682 Update NPS plugin to 1.0.1 (#11499) 2019-07-03 09:16:57 -04:00
Luke P
d0906a0c85 [MM-16517] Migrate "Status.Get" to Sync by default (#11367)
* Test

* Revert "Test"

This reverts commit 2bbf335ee9.

* Fixed typo in Makefile, line 564: 'persistent' misspelled

* Fixed return of status_store.Get to return model.Status and model.AppError, removed connections to result var in same method, generated new mocks and fixed tests.

* Fixed status_store.go under /sqlstore and /storetest in addition to removing personal comments

* SQL Indentation fix for consistency

* Revert merge change to store.go for SaveOrUpdate to avoid error introduced by merge

* Changed StoreChannel back to *model.Apperror for SaveOrUpdate in store.go, fixed resulting error in storetest/status_store.go so it did not have conflicting types. Fixed spelling errors in same file

* Test for status, err changed according to recommendation upon second look

* Changed status variable on line 77 to blank identifier to stop it from shadowing line 24 declaration

* It appears last statement in test was using 'status' variable where status is model.STATUS_ONLINE instead of model.STATUS_OFFLINE like status3, making comparison always be 'online != offline', which is always true, proceeding into if statement, guaranteeing test failure

* Build fails consistently when line 75 has 'status' in if statement due to shadowing issue due to existing declaration Jenkins complains about in line 24. If this fails then new variable will be necessary

* Renamed parameter to avoid overshadowing issue

* Undid code addition mistake in storetest/status_store.go and updated line 29 accordingly to account for multiple values.

* Remove status3 as used in line 71 in status_store.go.

* Undid change in storetest/status_store.go on line 67 which checked for wrong thing
2019-07-01 07:44:26 -04:00
Bob Lubecker
3993cac4ed MM-16264 - add cypress-test-data command to make file (#11130)
* add cypress-test-data command to make file

* apply changes to the standard test-data command
2019-06-25 07:06:44 -05:00
Hanzei
c05399ba9c Run go get commands explicitly without modules (#11290) 2019-06-20 13:09:05 -03:00
Lev
544055bdb3 Bumped Jira to 2.0.6 (#11191) 2019-06-14 12:12:10 -07:00
Lev
e0197ebddf Bumped Jira to 2.0.5 (#11184) 2019-06-14 08:29:03 -07:00
Lev
e0d084ab7a Bumped Jira to 2.0.4 (#11180)
Ignoring the irrelevant test failure
2019-06-13 17:10:54 -07:00
Harrison Healey
c78b769c2e MM-16277 Update NPS plugin to v1.0.0 (#11147) 2019-06-13 14:17:22 +02:00
Lev
2f7ef70d0f Bumped Jira to 2.0.3 (#11136) 2019-06-12 12:44:06 -07:00
Lev
03e5525fa6 Bumped Jira to 2.0.2 (#11131) 2019-06-11 15:59:52 -07:00
Christopher Speller
41774b671a Bump prepackaged github version to 0.10.2 (#11099) 2019-06-10 13:59:32 -07:00
Lev
c4609bfe38 Updated prepackaged Jira plugin version to 2.0.1 (#11075) 2019-06-07 10:18:23 -07:00
Christopher Poile
7f0911cf3e zoom v1.0.6 -> v1.0.7 (#11074) 2019-06-07 12:01:20 -04:00
Christopher Speller
0b62661ab0 Bump prepackaged github version to 0.10.1 (#11076) 2019-06-07 08:58:48 -07:00
Harrison Healey
f91dc57b4c Update NPS plugin to 1.0.0-rc2 (#11073) 2019-06-07 10:22:01 -04:00
Eli Yukelzon
6a42ad2af5 [MM-14400] Programmatically generate default.json (#10551)
* create/update config.json using go generate

* added default config generator
added config-reset to Jenkins and make package, updated defaults to consider 'isNew' flag

* corrections after code review

* fixed Config.isValid to handle empty encryption keys

* fixed Config.isValid to handle empty encryption keys

* fixed Config.isValid to handle empty encryption keys

* isUpdate now only checks for nil

* Addressed review comments, added unit testing for default config generator

* err shadowing

* license

* provide output file for config generator via ENV variable, since go generate doesn't support arguments and we need two output paths (config-reset and package)

* cleanup

* proper defaults for PushNotificationServer and SendPushNotifications

* corrected generating defaults for TrustedProxyIPHeader to be consistent with default.json in master

* Check for empty SiteURL as well as nil

* corrected SiteURL settings and checking

* crazy typos fixed

* corrected tests to newly expected values

* relaxed the checks

* fixed formatting
2019-06-06 13:57:01 -04:00
Carlos Tadeu Panato Junior
25333ac480 [MM-13745] Add mattermost-plugin-nps to prepackaged (#10483)
* add mattermost-plugin-nps to prepackaged

* Update NPS plugin version to v1.0.0-rc1
2019-06-03 15:39:44 -07:00
Christopher Poile
3236a40e14 MM-15817 Add custom-attributes as a bundled plugin (#11041) 2019-06-03 15:37:22 -07:00
Christopher Speller
eee26a7dd3 Add github to prepackaged plugins. (#11042) 2019-06-03 15:27:39 -07:00
Christopher Speller
85bd47a1d0 Add jirav2 to prepackaged plugins. (#11044) 2019-06-03 15:02:24 -07:00
Christopher Poile
1f397732dd Add welcomebot and aws-SNS to prepackaged plugins (#11048) 2019-06-03 14:10:08 -07:00
Lev
9b27558611 MM-15819 Add Autolink as a prepackaged plugin (#11040)
* Addink Autolink as a prepackaged plugin

* Fix packaging script.
2019-06-03 09:47:38 -07:00
Christopher Speller
118cd02613 MM-15882 Switching to new ci for prepackaged plugins and stripping alternate platform binaries. (#11025)
* Switching to new ci for prepackaged plugins and stripping alternate platform binaries.

* Feedback
2019-06-03 08:11:42 -07:00
Christopher Speller
6d336e0666 Adding EnsureBot plugin helper. (#10542)
* Adding EnsureBot plugin helper.

* Removing unessisary GetBot call.

* Moving to own file and error handling cleanup.

* Removing patch functionaliy. Plugins should manage their own bot account updates for now.

* Adding tests and cleaning up errors.

* Modify to not shadow err.

* Moving helpers to seperate interface.

* Feedback fixes
2019-05-06 12:44:38 -07:00
Carlos Tadeu Panato Junior
0d0d758208 Update minio docker image and minio-go dependency (#10770)
* update minio server1

* update minio go lib to use the latest release
2019-04-30 07:47:41 -07:00
Christopher Speller
41d117c37b MM-14617 Dependency upgrades and adding modules support. (#10517)
* Dependency upgrades and adding modules support.

* Commenting out file tests playload verification portion.

* Fixing viper.

* Fixing hclog.
2019-04-10 07:56:17 -07:00
Martin Kraft
25fd962016 MM-14412: Enables force removals of team/channel members base on group constraints. (#10490)
* MM-14412: Enables force removals of team/channel members base on group constraints.

* Renames some existing methods and variables.

* Change return types to ChannelMembers and TeamMembers for some existing methods.

* Adds option to change LDAP_DATA to either 'qa' or 'test' with env variable.

* Adds methods to retrieve ChannelMembers and TeamMembers that, based on group constraints, should be deleted.

* Adds helper functions to create GroupTeams and GroupChannels.

* MM-14412: Switches to helper methods for GroupSyncable creation in test files.

* MM-14412: Style fix.

* MM-14412: Switches remaining GroupSyncable instances to be created with helper functions.

* MM-14412: Typo fix.

* MM-11412: Build fixes.

* MM-14412: Checks if user is team member before re-adding.

* MM-14412: Update for change of GroupConstrained fields type.
2019-04-02 09:22:50 -04:00
Eli Yukelzon
0e534c8a49 MM-14559 Rewrite existing plugin API tests to exclusively test via actual plugin (#10494)
* initial work on rewriting test cases using the raw literal format

* split out the embedded tests into separate file and implement the test using a generic tester function

* initial work on rewriting test cases using the raw literal format

* split out the embedded tests into separate file and implement the test using a generic tester function

* moved tests to separate dir to avoid conflicts

* removed duplicate files

* added license header

* fixed plugin paths

* moved all trivial tests to separate files
created "meta-test" that scans a folder of api tests and runs them

* remove rpc tests from make

* use fileutil.FindDir instead of pwd
clean up the test files
2019-04-01 08:39:45 -07:00
Julien Reichardt
64562d53c0 Build tooling enhancements (#10429)
* Add LDFLAGS variable

* Replace curl by wget

* Revert "Replace curl by wget"

This reverts commit f40323c3d2.

* Use curl instead of wget

* Merge GO_LINKER_FLAGS into LDFLAGS
2019-03-26 15:19:12 -07:00
Sandeep Sukhani
a9c327c068 [MM-13341] Add an upgrade test to verify schema (#10419)
* [MM-13341] Add an upgrade test to verify schema

Upgrade test is done by following steps:
1. A mysql dump generated from v4.10.0 is imported in a database and is ran through migration code
2. Another fresh database is generated without any initial data, which gets latest schema.
3. Diff between these 2 databases is generated using mysqldiff tool from mysql utilities

For db setup, version cli command is used which takes care of migration or setup of fresh db

* Using 5.7 tag for mysql docker image which is already used for db setup

* Starting docker containers for db before running tests

* Using db from v5.0.0 for migration test

* Added migration test for psql and made some improvements in running commands in docker

* Add postgres db dump file

* Updated message

* moved dump files to scripts and using error code from diff command
2019-03-19 15:05:15 -04:00
Miguel de la Cruz
44887a0272 Adds elasticsearch to the user and channel autocompletion functions (#10354)
* Adds elasticsearch to the user and channel autocompletion functions

* Implement channel store GetChannelsByIds test

* Style changes and govet fixes

* Add gofmt fixes

* Extract default channel search limit to a const

* Add StringSliceDiff function to the utils package

* Honor USER_SEARCH_MAX_LIMIT on the user autocomplete api handler

* Change the elasticsearch development image
2019-03-15 17:53:53 +00:00
Jesse Hallam
55103b0a78 fix vettool; run vet on all available packages (#10389)
#### Summary
Unfortunately, `which shadow` didn't resolve to the shadow binary, so hard-code the expected path in `$GOPATH/bin`. At the same time, run `go vet` across both the server and enterprise (if present), reducing the number of required invocations.

This is accompanied by an enterprise change to fix shadowing issues there.

#### Ticket Link
N/A (tooling upgrade)

#### Checklist
- [x] Has enterprise changes: https://github.com/mattermost/enterprise/pull/403
2019-03-04 15:27:59 +01:00
Carlos Tadeu Panato Junior
6a3fdbd489 update go to 1.12 (#10382)
* update go to 1.12

* update per feedback

* fix test

* revert test changes

* remove zap.AddCallerSkip(1)
2019-03-01 12:55:35 -05:00
Christopher Poile
476a66099f [MM-11142] Console logging should be human readable during developmen… (#10352)
* MM-11142: Console logging should be human readable during dev #10349

* MM-11142: Console logging should be human readable during dev #10349
2019-02-28 11:42:56 -05:00
Hanzei
0c981aa010 Prohibit variable shadowing (#10177)
* Prohibit variable shadowing

* Fix outstanding shadowed variables
2019-01-31 12:16:16 +01:00
Martin Kraft
6d30b21dd2 Ldap groups phase1 (#9752)
* Initial models, API, app, and persistence of groups and group syncing.

* Consistent letter casing in ldif.

* Moves group-specific migrations into func.

* Adds API endpoint to retrieve LDAP groups (and associated MM groups) one tree level at a time.

* Adds mattermost group id to SCIMGroup (if available).

* Splits user and group creation so that memberOf works. Returns users from ldap interface.

* Updates method name.

* Returns users IDs instead of User.

* Removes non-essential group data.

* MM-11807: Add GroupFilter to LDAP config. (#9513)

* MM-11807: Add GroupFilter to LDAP config.

* Add diagnostic.

* Adds new config option for using 'memberOf' overlay.

* Adds API endpoint to link a group.

* Removes debug statements.

* Adds unlink group API endpoint.

* Fix to LDAP API. Adds API method to client4 and app.

* Adds some missing app methods. Renames API unexported func.

* Fixes link/unlink API path to accept valid DNs.

* Allow any character for DN portion of path.

* Switches from DN to objectGUID or entryUUID as the remote identifier linking LDAP groups to MM groups.

* Formatting.

* Formatting.

* Setting group name field to an ID for phase 1.

* Adds an LDAP config field to Setting up configuration for local LDAP.

* Changes to LDAP and GroupStore interfaces.

* Draft of nesting groups in API response.

* Removes unnecessary tree models.

* Updates group membershipt create store method to also restore.

* Adds new config to test config.

* Accept AD format length.

* Switches to SetUniqueTogether method.

* Updates revert.

* Tweaks to syncing queries .

* Updates query for pending team and channel memberships.

* Removes old GroupSyncableScanner usage. Some formatting and renaming.

* Fixes bug setting syncable type in selecting paged.

* Adds tests for syncables populator.

* Only add users to teams and channels that are not deleted.

* Renames method.

* Updates test LDAP setup.

* Removes memberof config stuff.

* Renames.

* Updates test data.

* Fix for gofmt.

* Adds missing license.

* Adds missing teardowns.

* Test fix.

* Adds a cycle to the groups test data.

* Changes API to return flat list.

* Removes some unused interface and app methods.

* Returns empty braces if results are empty.

* Adds more LDAP test data.

* Fix for test data error.

* Adds error.

* Moves test groups.

* Adds OU for load test data.

* Moves load test ou creation to load data.

* Adds a new bool flag to SCIMGroups.

* Removes SCIMGroup completely.

* Removes FULL JOIN because it is not supported in MySQL.

* Adds tests for sync queries; renames constant.

* Bad merge fix.

* Vet fix.

* Returning OK on delete ldap group link

* Removes foreign key constraints.

* Adding total to the ldap getAllGroups api endpoint

* Adds get group members page.

* Removes pagination from groups syncables list API.

* Adding syncable check now that foreign key constraint is removes.

* Joins teams and channels to group syncables.

* Adds group member count.

* Adding GetAllChannels and SearchAllChannels for system admins only

* Fix.

* Test fix from pagination removal.

* Orders groupmembers by createat.

* Fixing search of all channels

* Test fix after removing pagination.

* JSON syntax error fix.

* Changing tests (for now) pending investigation.

* Adding GetAllChannels and SearchAllChannels tests for the store

* Adding GetAllChannels and SearchAllChannels API tests

* Omit empty JSON values of group syncables.

* Fixing GetAllChannels and SearchAllChannels tests

* Fixing GetAllChannels and SearchAllChannels store tests

* Fixing GetAllChannels api tests

* Adds 'LDAP groups' feature flag. (#9861)

* Migrate new client functions to idiomatic error handling

* Test fixes.

* Simplification of groups api (#9860)

* Simplification of groups api

* Fixing RequireSyncableType

* Test fix.

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Update api4/group.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Fix copy/paste error.

* Fix copy/paste error.

* Adds missing return, changes to correct HTTP status code.

* Adds missing return, changes status codes.

* Check for license.

* Renames variable for new signature.

* Adds client method to get a group.

* Adds client method and tests for PatchGroup.

* Adds more API tests.

* Adds groups API tests.

* Adds client method and tests for getting group syncables.

* Adds tests for patching group teams and channels.

* Update to translations.

* Removes test.

* Fix incorrect conditional.

* Removes unnecessary nil check.

* Removes unnecessary return.

* Updates comment, removes unused variable.

* Uses consistent JSON unmarshal pattern.

* Uses consistent JSON unmarshal pattern.

* Moves const block.

* Switches 'already linked' from error to success response.

* Removes commented-out code.

* Switched to status ok.

* Add parens for readability.

* Fix copy/paste error.

* Unexport some structs.

* Removes repeated validity check.

* Return without attempting commit if there's a rollback.

* Fix incorrect HTTP status code.

* Update store/sqlstore/group_supplier.go

Co-Authored-By: mkraft <martinkraft@gmail.com>

* Adds utility methods for going from groupsyncable to groupteam and groupchannel.

* Fixing george suggestions (#9911)

* Test fix.

* Adds QA data to VC with visualization.

* Fixes typo in graph image.

* Update display name when re-linking in case it has changed in LDAP.

* Adds ability to configure group display name and unique identifier. (#9923)

* Adds ability to configure group display name and unique identifier.

* Adds some configs to confi-ldap make command.

* Fix for move of session.

* Exposes method for use by SAML package.

* Switches GroupSyncableType from int to string.

* Update Jenkins build files.

* Removes unused variable assignment.

* Removes old unnecessary early return.

* Removes unnecessary variable.

* Moves param parsing before license and permissions checks.

* Removes old code.

* Compares agains underlying error rather than error id.

* Switches tests to assertions.

* Adds more assertions.

* Adds missing return.

* Adds space after comma for added legibility.

* Moves a view model to the api package.

* Unexports method.

* Uses id validator function.

* Fix docker-compose flag.

* Typo fix.

* Moves index creation to supplier.

* Removes bad merge.

* Renames parameter.

* Re-adds space.

* Removes unnecessary transaction.

* Escapes the Groups table name with backticks because it is a reserved keyword.

* Fix roles cache bug

* Removing unnecesiary deserializing function

* Switches table name rather than custom SQL everywhere for Postgres without backticks.

* Removes redundant check for sql.ErrNoRows.

* Removes redundant check for sql.ErrNoRows.

* Removes data integrity check and redundant nil conditional.

* Removes redundant check for sql.ErrNoRows.

* Removes unnecessary query.

* Removes ID length validation from persistence tier.

* Makes some supplier methods idempotent.

* Removes some empty switch defaults.

* Renames Group Type field to Source.

* Fix for mistaken field name change.

* Uses IsValidId function.

* Removes comment.

* Changes json key name.

* Removes test because no longer validating user.

* Moves model state validation to app layer.

* Don't create Groups.CanLeave column until phase 2.

* Removes state validation until properties are used in phase 2.

* Removes duplicated check.

* Removes state validation until properties are used in phase 2.

* Removes some tests until phase 2.

* Comment-out a bunch of test related to CanLeave.

* Extra unmarshal validation check. Removes more code for CanLeave.

* Removes tests for CanLeave.

* Explict error msg.

* Rewrite queries.

* Changes index name. Adds index.

* Removes assertion.

* Adds experimental feature flag.
2019-01-10 15:17:31 -05:00
Jesse Hallam
8374b6221e unittest using externally managed database (#9400)
* MM-12083: unittest using externally managed database

* cherry-pick Makefile changes from @cpanato

* Jenkins changes (#9915)

* add docker compose

* udpate

* when using minio dont need to set the region

* update

* add wait for it script

* using old minio

* add new jenkins file

* update makefile

* add dockerfile

* rename the docker-compose proj to avoid colision (#9917)

* rename the docker-compose proj to avoid colision

* enable debug

* enable debug to double checkt the branchs and fix docker-compose name (#9919)

* add ee hash to check (#9920)

* fix name (#9921)

* update jenkins file to push from branch and prs

* if a new push comes in stop the running build

* split mysql and postgres variables

* add script to run jenkins-like env in local dev env

* update docker-compose project name to use uuid to make it more randon

* fix DCNAME definition

* update elasticsearch docker image

* revert test

* tidy up stages, and wait for mysql differently

* update docker image and add check for postgres

* checking if is ready

* update docker compose to have a wait for deps

* add readme and rename dockerfile

* fix -unittest setup

* using mm docker image

* restore parallel unit tests at the package level

Spin up a dedicated database for each package under test to avoid races in accessing the same tables.
Simplify the interface for configuring the test database to just a DSN instead of multiple exports for each field.

* try to work around root mysql access in CI

* update local-test-env.sh too

* MYSQL_ROOT_HOST: %

* fix missing quotes

* setting some memory limits for mysql

* revert memory docker compose does not support

* fix env name for postgres

* expose errors in app/export_test.go

* fix test label, better error checking on teardown

* increase query timeout for tests

* fix export_test

* update local dev script

* add configurable mysql root passwd
2018-12-10 17:58:09 +01:00
Jesse Hallam
d39d9a5caf Dockerized build updated tests (#9943)
* testlib: introduce and leverage

This doesn't yet factor out the individual test helpers: many packages
still rely on `api4` directly to do this, but now wire up the test store
setup through this package. `app` and `store`, in particular, don't use
`testlib` because of circular dependencies at the moment.

* cmd: command_test.go: use api4 testlib

* cmd: plugin_test.go: remove dependence on test-config.json

* cmd: config_test.go use configured database settings

* ensure test-(te|ee) exit with status code

* test-server: run all tests, deprecating test-te/test-ee

* cmd/mattermost/commands: fix unit tests

Instead of relying on (and modifying) a config.json found in the current path, explicitly create a temporary one from defaults for each test. This was likely the source of various bugs over time, but specifically allows us to override the SqlSettings to point at the configured test database for all tests simultaneously.

* wrap run/check into a test helper

It was insufficient to set a config for each invocation of CheckCommand or RunCommand: some tests relied on the config having changed in a subsequent assertion. Instead, create a new test helper embedding api4.TestHelper. This has the nice advantage of cleaning up all the teardown.

* additional TestConfigGet granularity

* customized config path to avoid default location

* be explicit if the storetest initialization fails

* generate safe coverprofile names in the presence of subtests

* additional TestConfigShow granularity

* fix permission_test.go typo

* fix webhook tests

* actually flag.Parse() to skip database setup on os.Execed tests

* fix recent regression in #9962, not caught by unit tests
2018-12-06 13:19:32 -05:00
Hanzei
de5440d979 Depreciate fullmap target (#9963) 2018-12-05 10:13:00 -08:00
Jesús Espino
8bbd99aea9 Adding make i18n-extract command to the makefile (#9909) 2018-11-29 08:19:26 -08:00
Christopher Speller
da265fbaf7 Moving app from singular to being created for every request (#9889)
* Moving app from singular to being created for every request.

* Automatic refactor

* Adding license header

* Feedback fixes
2018-11-28 10:56:21 -08:00
Jesse Hallam
136d8ca5c4 Various unit test related improvements (#9865)
* api4: improved error handling

* system_store: more logs

* integrate go-junit-report into test-te/test-ee

* add CI_MINIO_HOST and CI_INBUCKET_HOST instead of CI_HOST

* comment re: minio configuration issue

* fix TestStartServerPortUnavailable to pass even when root can bind to :21

* skip TestFindManifest_FolderPermission while running as root
2018-11-28 09:05:39 -05:00
Jesse Hallam
a78913178c Ensure unittest isolation (#9819)
* api4: fix TestGetUsersNotInTeam assertions

This test was relying on data from a previous test run. With the data cleared before each test, the assertions much match reality.

* *testlib: always InitSystemAdmin

Some tests implicitly relied on the basic user having system
administrator privileges because it was the first user created as such.
Eliminate `InitSystemAdmin` and explicitly create the system admin user
instead to avoid this ambiguity going forward.

* *testlib: drop all tables before each test

* api4: split up TestChannelDelete to avoid duplicate InitBasic

* api4: teardown in TestResetPassword, for when this test comes back

* invalidate cache on DropAllTables

This is necessary since the test store persists across tests.

* disable parallel tests

While tests within a package must be explicitly parallelized using `t.Parallel()`, tests across packages are run in parallel by default.  This causes problems given that the tests all currently share the same database instance.

Unfortunately, this also means that running the tests is much slower, but we can return to this later.
2018-11-20 20:16:25 -05:00