Skip to content

Registry tests: support running a limited subset of tests that don't require the Admin service #645

@timburks

Description

@timburks

To further address #611, it would be helpful to be able to point our core server test suite at a hosted instance of the registry server. Since these instances don't provide the Admin service, tests that use Admin functions would need to be omitted or ignored. Since nearly all tests use the seeder package, these tests would need to be modified to not create projects - but this could be worked around by modifying the CreateProject method in the test proxy (#640) to always succeed on creation requests for a specified project. Since project ids are in all of our resource names, we could either modify those in the tests (which seems awkward) or remap the project ids in the test proxy, e.g. by replacing 'projects/my-project' with the project of the hosted instance being tested.

Test invocations might look like this:

go test ./server/registry -remote -hosted -project_id myproject

where -remote triggers use of the remote proxy, -hosted limits tests to non-Admin rpcs, and -project_id specifies the project ID. We could also merge some of these which are likely to be used in combinations, e.g. the following might imply everything described above:

go test ./server/registry -hosted myproject

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions