Skip to content

Commit

Permalink
Git tests fix (#2049)
Browse files Browse the repository at this point in the history
* make sure to set feature flag env var for tests

* fix import

* add git and github tests

* Update test/e2e/flux_test.go

Co-authored-by: Taylor Neyland <[email protected]>

Co-authored-by: Taylor Neyland <[email protected]>
  • Loading branch information
danbudris and taneyland authored May 6, 2022
1 parent ac57fbd commit dc7e82e
Showing 1 changed file with 71 additions and 0 deletions.
71 changes: 71 additions & 0 deletions test/e2e/flux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,32 @@ func TestVSphereKubernetes122FluxLegacy(t *testing.T) {
runFluxFlow(test)
}

func TestVSphereKubernetes122GithubFlux(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithUbuntu122()),
framework.WithFluxGithub(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithEnvVar(features.GenericGitProviderEnvVar, "true"),
)
runFluxFlow(test)
}

func TestVSphereKubernetes122GitFlux(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithUbuntu122()),
framework.WithFluxGit(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube122)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithEnvVar(features.GenericGitProviderEnvVar, "true"),
)
runFluxFlow(test)
}

func TestVSphereKubernetes120BottleRocketFluxLegacy(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithBottleRocket120()),
Expand All @@ -143,6 +169,32 @@ func TestVSphereKubernetes121BottleRocketFluxLegacy(t *testing.T) {
runFluxFlow(test)
}

func TestVSphereKubernetes121BottleRockeGithubtFlux(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithBottleRocket121()),
framework.WithFluxGithub(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube121)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithEnvVar(features.GenericGitProviderEnvVar, "true"),
)
runFluxFlow(test)
}

func TestVSphereKubernetes121BottleRocketGitFlux(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithBottleRocket121()),
framework.WithFluxGit(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube121)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithEnvVar(features.GenericGitProviderEnvVar, "true"),
)
runFluxFlow(test)
}

func TestVSphereKubernetes122ThreeReplicasThreeWorkersFluxLegacy(t *testing.T) {
test := framework.NewClusterE2ETest(t,
framework.NewVSphere(t, framework.WithUbuntu122()),
Expand Down Expand Up @@ -226,3 +278,22 @@ func TestVSphereKubernetes121To122FluxUpgradeLegacy(t *testing.T) {
provider.WithProviderUpgrade(framework.UpdateUbuntuTemplate122Var()),
)
}

func TestVSphereKubernetes121To122GitFluxUpgrade(t *testing.T) {
provider := framework.NewVSphere(t, framework.WithUbuntu121())
test := framework.NewClusterE2ETest(t,
provider,
framework.WithFluxGit(),
framework.WithClusterFiller(api.WithKubernetesVersion(v1alpha1.Kube121)),
framework.WithClusterFiller(api.WithExternalEtcdTopology(1)),
framework.WithClusterFiller(api.WithControlPlaneCount(1)),
framework.WithClusterFiller(api.WithWorkerNodeCount(1)),
framework.WithEnvVar(features.GenericGitProviderEnvVar, "true"),
)
runUpgradeFlowWithFlux(
test,
v1alpha1.Kube122,
framework.WithClusterUpgrade(api.WithKubernetesVersion(v1alpha1.Kube122)),
provider.WithProviderUpgrade(framework.UpdateUbuntuTemplate122Var()),
)
}

0 comments on commit dc7e82e

Please sign in to comment.