-
Notifications
You must be signed in to change notification settings - Fork 333
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e): parallelize universal environment (#4164)
Signed-off-by: Jakub Dyszkiewicz <[email protected]>
- Loading branch information
1 parent
97c6620
commit fde23db
Showing
28 changed files
with
374 additions
and
249 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
This file was deleted.
Oops, something went wrong.
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
File renamed without changes.
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,54 @@ | ||
package auth_test | ||
|
||
import ( | ||
"encoding/json" | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
|
||
"github.com/kumahq/kuma/pkg/config/core" | ||
"github.com/kumahq/kuma/pkg/test" | ||
"github.com/kumahq/kuma/test/e2e_env/universal/auth" | ||
"github.com/kumahq/kuma/test/e2e_env/universal/env" | ||
"github.com/kumahq/kuma/test/e2e_env/universal/healthcheck" | ||
. "github.com/kumahq/kuma/test/framework" | ||
) | ||
|
||
func TestE2E(t *testing.T) { | ||
test.RunSpecs(t, "E2E Universal Suite") | ||
} | ||
|
||
var _ = SynchronizedBeforeSuite( | ||
func() []byte { | ||
env.Cluster = NewUniversalCluster(NewTestingT(), Kuma3, Silent) | ||
E2EDeferCleanup(env.Cluster.DismissCluster) | ||
Expect(env.Cluster.Install(Kuma(core.Standalone, WithEnv("KUMA_STORE_UNSAFE_DELETE", "true")))).To(Succeed()) | ||
pf := env.Cluster.GetKuma().(*UniversalControlPlane).Networking() | ||
bytes, err := json.Marshal(pf) | ||
Expect(err).ToNot(HaveOccurred()) | ||
return bytes | ||
}, | ||
func(bytes []byte) { | ||
if env.Cluster != nil { | ||
return // cluster was already initiated with first function | ||
} | ||
networking := UniversalCPNetworking{} | ||
Expect(json.Unmarshal(bytes, &networking)).To(Succeed()) | ||
env.Cluster = NewUniversalCluster(NewTestingT(), Kuma3, Silent) | ||
E2EDeferCleanup(env.Cluster.DismissCluster) // clean up any containers if needed | ||
cp, err := NewUniversalControlPlane( | ||
env.Cluster.GetTesting(), | ||
core.Standalone, | ||
env.Cluster.Name(), | ||
env.Cluster.Verbose(), | ||
networking, | ||
) | ||
Expect(err).ToNot(HaveOccurred()) | ||
env.Cluster.SetCp(cp) | ||
}, | ||
) | ||
|
||
var _ = Describe("User Auth", auth.UserAuth) | ||
var _ = Describe("DP Auth", auth.DpAuth, Ordered) | ||
var _ = Describe("HealthCheck panic threshold", healthcheck.HealthCheckPanicThreshold, Ordered) |
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
Oops, something went wrong.