var scheme … var codecs … const discoveryPath … func init() { … } func fuzzAPIGroups(atLeastNumGroups, maxNumGroups int, seed int64) apidiscoveryv2.APIGroupDiscoveryList { … } func fetchPathV2Beta1(handler http.Handler, acceptPrefix string, path string, etag string) (*http.Response, []byte, *apidiscoveryv2beta1.APIGroupDiscoveryList) { … } func fetchPath(handler http.Handler, acceptPrefix string, path string, etag string) (*http.Response, []byte, *apidiscoveryv2.APIGroupDiscoveryList) { … } func fetchPathHelper(handler http.Handler, accept string, path string, etag string) (*http.Response, []byte) { … } // Add all builtin APIServices to the manager and check the output func TestBasicResponse(t *testing.T) { … } // Test that protobuf is outputted correctly func TestBasicResponseProtobuf(t *testing.T) { … } // V2Beta1 should still be served func TestV2Beta1SkewSupport(t *testing.T) { … } // Test that an etag associated with the service only depends on the apiresources // e.g.: Multiple services with the same contents should have the same etag. func TestEtagConsistent(t *testing.T) { … } // Test that if a request comes in with an If-None-Match header with an incorrect // E-Tag, that fresh content is returned. func TestEtagNonMatching(t *testing.T) { … } // Test that if a request comes in with an If-None-Match header with a correct // E-Tag, that 304 Not Modified is returned func TestEtagMatching(t *testing.T) { … } // Test that if a request comes in with an If-None-Match header with an old // E-Tag, that fresh content is returned func TestEtagOutdated(t *testing.T) { … } // Test that an api service can be added or removed func TestAddRemove(t *testing.T) { … } // Show that updating an existing service replaces and does not add the entry // and instead replaces it func TestUpdateService(t *testing.T) { … } func TestMultipleSources(t *testing.T) { … } // Shows that if you have multiple sources including Default source using // with the same group name the groups added by the "Default" source are used func TestSourcePrecedence(t *testing.T) { … } // Show the discovery manager is capable of serving requests to multiple users // with unchanging data func TestConcurrentRequests(t *testing.T) { … } // Show the handler is capable of serving many concurrent readers and many // concurrent writers without tripping up. Good to run with go '-race' detector // since there are not many "correctness" checks func TestAbuse(t *testing.T) { … } func TestVersionSortingNoPriority(t *testing.T) { … } func TestVersionSortingWithPriority(t *testing.T) { … } // if two apiservices declare conflicting priorities for their group priority, take the higher one. func TestGroupVersionSortingConflictingPriority(t *testing.T) { … } // Show that the GroupPriorityMinimum is not sticky if a higher group version is removed // after a lower one is added func TestStatelessGroupPriorityMinimum(t *testing.T) { … }