Mark a test case which sets up a sample-apiserver as serial due to potential conflicts with other test cases which do the same.

Signed-off-by: Feilian Xie <fxie@redhat.com>
This commit is contained in:
Feilian Xie 2024-07-09 19:25:51 +08:00
parent d27e3462ba
commit 3b5b3a80be
2 changed files with 10 additions and 1 deletions

View File

@ -131,6 +131,12 @@ func generateSampleAPIServerObjectNames(namespace string) sampleAPIServerObjectN
} }
} }
// SetUpSampleAPIServer sets up a sample-apiserver.
//
// Important:
// Test cases that call this function should be marked as serial due to potential conflicts
// with other test cases that also set up a sample-apiserver. For more information, see
// https://github.com/kubernetes/kubernetes/issues/119582#issuecomment-2215054411.
func SetUpSampleAPIServer(ctx context.Context, f *framework.Framework, aggrclient *aggregatorclient.Clientset, image string, n sampleAPIServerObjectNames, apiServiceGroupName, apiServiceVersion string) { func SetUpSampleAPIServer(ctx context.Context, f *framework.Framework, aggrclient *aggregatorclient.Clientset, image string, n sampleAPIServerObjectNames, apiServiceGroupName, apiServiceVersion string) {
ginkgo.By("Registering the sample API server.") ginkgo.By("Registering the sample API server.")
client := f.ClientSet client := f.ClientSet

View File

@ -171,8 +171,11 @@ var _ = SIGDescribe("OpenAPIV3", func() {
Release : v1.27 Release : v1.27
Testname: OpenAPI V3 Aggregated APIServer Testname: OpenAPI V3 Aggregated APIServer
Description: Create an Aggregated APIServer. The OpenAPI V3 for the aggregated apiserver MUST be aggregated by the aggregator and published. The specification MUST be round trippable. Description: Create an Aggregated APIServer. The OpenAPI V3 for the aggregated apiserver MUST be aggregated by the aggregator and published. The specification MUST be round trippable.
This test case is marked as serial due to potential conflicts with other test cases that set up a sample-apiserver.
For more information, see: https://github.com/kubernetes/kubernetes/issues/119582#issuecomment-2215054411.
*/ */
ginkgo.It("should contain OpenAPI V3 for Aggregated APIServer", func(ctx context.Context) { f.It("should contain OpenAPI V3 for Aggregated APIServer", f.WithSerial(), func(ctx context.Context) {
config, err := framework.LoadConfig() config, err := framework.LoadConfig()
framework.ExpectNoError(err) framework.ExpectNoError(err)
aggrclient, err := aggregatorclient.NewForConfig(config) aggrclient, err := aggregatorclient.NewForConfig(config)