-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for synced pvs and retain SC and add e2e
- Loading branch information
1 parent
f0d5638
commit ece23b9
Showing
8 changed files
with
380 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package e2e | ||
|
||
import ( | ||
"context" | ||
"testing" | ||
|
||
"github.com/loft-sh/log" | ||
"github.com/loft-sh/vcluster/test/framework" | ||
"github.com/onsi/ginkgo/v2" | ||
"github.com/onsi/gomega" | ||
apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" | ||
apiextensionsv1beta1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1" | ||
"k8s.io/apimachinery/pkg/runtime" | ||
clientgoscheme "k8s.io/client-go/kubernetes/scheme" | ||
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp" | ||
apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" | ||
|
||
// Enable cloud provider auth | ||
_ "k8s.io/client-go/plugin/pkg/client/auth" | ||
|
||
// Register tests | ||
_ "github.com/loft-sh/vcluster/test/e2e_pvc_retain/reusevolume" | ||
) | ||
|
||
var ( | ||
scheme = runtime.NewScheme() | ||
) | ||
|
||
func init() { | ||
_ = clientgoscheme.AddToScheme(scheme) | ||
// API extensions are not in the above scheme set, | ||
// and must thus be added separately. | ||
_ = apiextensionsv1beta1.AddToScheme(scheme) | ||
_ = apiextensionsv1.AddToScheme(scheme) | ||
_ = apiregistrationv1.AddToScheme(scheme) | ||
} | ||
|
||
// TestRunE2ETests checks configuration parameters (specified through flags) and then runs | ||
// E2E tests using the Ginkgo runner. | ||
// If a "report directory" is specified, one or more JUnit test reports will be | ||
// generated in this directory, and cluster logs will also be saved. | ||
// This function is called on each Ginkgo node in parallel mode. | ||
func TestRunE2ETests(t *testing.T) { | ||
gomega.RegisterFailHandler(ginkgo.Fail) | ||
err := framework.CreateFramework(context.Background(), scheme) | ||
if err != nil { | ||
log.GetInstance().Fatalf("Error setting up framework: %v", err) | ||
} | ||
|
||
var _ = ginkgo.AfterSuite(func() { | ||
err = framework.DefaultFramework.Cleanup() | ||
if err != nil { | ||
log.GetInstance().Warnf("Error executing testsuite cleanup: %v", err) | ||
} | ||
}) | ||
|
||
ginkgo.RunSpecs(t, "pvc syncing") | ||
} |
Oops, something went wrong.