Commit Graph

8 Commits

Author SHA1 Message Date
Brendan Forster
8cd0b341dd Begin implementation of Enterprise ManagementConsole API, redux (#2010)
* Initial implementation of ManagementConsole - maintenance mode

* Add environment var support for management console password for integration tests

* Add reactive client and unit tests

* Update some xmlDoc

* I think this is a better way to setup the underlying baseUri on IConneciton, to achieve managemet console access rather than requiring a specific GitHubClient that cant call normal API's
Instead, the management client methods can check the base Url and if it contains /api/v3/ they can set their relative endpoint Uri to include a leading "/" which will cause the /api/v3/ to be removed.

* Update EnterpriseClient.cs

Fix xml comments

* Update IEnterpriseClient.cs

Fix xml comments

* Still trying to get the xmDoc perfect, thanks app veyor :)

* XmlDoc'ing my way to success

* Add specific test attribute for management console tests

* check chronic string empty/null

* Use helper's password field in test

* Tidy up maintenance mode tests by using a context/destructor to manage the initial/end state of maintenance mode

* make internal and tidy up URL concatenation

* move GHE endpoint fixup inside ApiUrls methods

* Rework request object to be the correct structure so SimpleJsonSerializer can be used to serialize it.  Remove MaintenanceDate class and just pass in the Date/string for when
Still need to use UrlFormEncoding rather than json in the POST body though...

* Create abstract base class for FormUrlEncoded parameters (similar to existing RequetParameters) and inherit from it in UpdateMaintenanceRequest

* Fix maintenance context logic - destructor should always turn maintenance OFF regardless of initial requested state

* Fix xml comment

* Fix Xml comment

* Those pesky xml comments!

* Fine, I give up!

* Fix string.Format

* fix bad rebase

* fix failing convention tests

* restore missing whitespace

* writing some docs

* some edits

* edit
2019-09-22 15:09:56 -03:00
tasadar2
f771147f1d Added a pre-receive environments client (#1796)
* Added pre-receive environment client

https://developer.github.com/v3/enterprise-admin/pre_receive_environments

* Added unit and integration tests for the pre-receive environments client

* moved test setup outside of tests

* fixed unit test

* Added reactive components for pre-receive environment endpoints

* Debugger display's and non public setters on response object conventions

* removed redundant parameter attributes

implemented update request independently of new request
changed ints to longs for future proofing
updated unit tests
changed update integration tests to create a new update request to ensure optional values function

* updating reactive environmentids to longs as well

* also converting response id to a long

* Fixed an incorrect unit test

renamed some test variable names for consistency
Added mockable ctors on responses, and parameterless ctors to maintain functionality

* Adding missing state parameter

* rename client member accessor to singular form in accordance with octokit naming conventions

* fixup tests

* add integration tests for observable client
2018-05-08 21:49:52 +10:00
Ryan Gribble
7fa1faa5c4 integration helper context classes now work against github.com or github enterprise, by using the IConnection used to create the context, to delete it in Dispose()
update CreateContext extension methods to pass in the IConnection
2016-06-08 21:52:16 +10:00
Prayank Mathur
db8738b675 Corrected TheUpdateMethod.EnsureArgumentsNotNull() 2016-03-17 16:38:42 +05:30
Ryan Gribble
c56588d394 Add integration tests and context helper for creating/destroying users on GitHub Enterprise during integration tests 2016-02-22 21:04:13 +10:00
Ryan Gribble
1f13001fd8 Change the QueueLdapSync calls to use Post<T>(uri) with no body/data 2016-02-12 09:37:33 +10:00
Ryan Gribble
bb4086b64d Rename EnterpriseHelper properties to remove "GHE" prefix 2016-02-02 22:02:28 +10:00
Ryan Gribble
535709c368 Better support for GitHub Enterprise integration tests
- Remove EnterpriseUrl in integration test Helper class, but leave ability to override custom URL (to allow specific use case of targetting regular integration tests at a custom URL)
- Move GitHub Enterprise explicit support to a new integration helper class using new OCTOKIT_GHE_ environment variables for GHE
- Change existing GitHub Enterprise integration tests and EnterpriseTestAttribute to use the new EnterpriseHelper methods
- Enhance configure-intergration-tests.ps1 script to cater for environment variable changes
2016-02-01 21:10:33 +10:00