-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ginkgo contexts instead and let ginkgo handle them, instead of creating our on contexts. Signed-off-by: Nahshon Unna-Tsameret <[email protected]>
- Loading branch information
Showing
18 changed files
with
301 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,17 +22,17 @@ var _ = Describe("[rfe_id:5100][crit:medium][vendor:[email protected]][level:sys | |
flag.Parse() | ||
|
||
var cli kubecli.KubevirtClient | ||
BeforeEach(func() { | ||
BeforeEach(func(ctx context.Context) { | ||
tests.BeforeEach() | ||
virtCli, err := kubecli.GetKubevirtClient() | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
cli, err = kubecli.GetKubevirtClientFromRESTConfig(virtCli.Config()) | ||
Expect(err).ToNot(HaveOccurred()) | ||
tests.FailIfNotOpenShift(cli, "ConsoleCliDownload") | ||
tests.FailIfNotOpenShift(ctx, cli, "ConsoleCliDownload") | ||
}) | ||
|
||
It("[test_id:6956]should create ConsoleCliDownload objects with expected spec", Label("test_id:6956"), func() { | ||
It("[test_id:6956]should create ConsoleCliDownload objects with expected spec", Label("test_id:6956"), func(ctx context.Context) { | ||
By("Checking existence of ConsoleCliDownload") | ||
s := scheme.Scheme | ||
_ = consolev1.Install(s) | ||
|
@@ -44,7 +44,7 @@ var _ = Describe("[rfe_id:5100][crit:medium][vendor:[email protected]][level:sys | |
Name("virtctl-clidownloads-kubevirt-hyperconverged"). | ||
AbsPath("/apis", consolev1.GroupVersion.Group, consolev1.GroupVersion.Version). | ||
Timeout(10*time.Second). | ||
Do(context.TODO()).Into(&ccd)).To(Succeed()) | ||
Do(ctx).Into(&ccd)).To(Succeed()) | ||
|
||
ExpectWithOffset(1, ccd.Spec.Links).Should(HaveLen(6)) | ||
|
||
|
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 |
---|---|---|
|
@@ -20,19 +20,19 @@ var _ = Describe("[rfe_id:5108][crit:medium][vendor:[email protected]][level:sys | |
|
||
var cli kubecli.KubevirtClient | ||
|
||
BeforeEach(func() { | ||
BeforeEach(func(ctx context.Context) { | ||
tests.BeforeEach() | ||
|
||
virtCli, err := kubecli.GetKubevirtClient() | ||
Expect(err).ToNot(HaveOccurred()) | ||
|
||
tests.FailIfNotOpenShift(virtCli, "Dashboard configmaps") | ||
tests.FailIfNotOpenShift(ctx, virtCli, "Dashboard configmaps") | ||
|
||
cli, err = kubecli.GetKubevirtClientFromRESTConfig(virtCli.Config()) | ||
Expect(err).ToNot(HaveOccurred()) | ||
}) | ||
|
||
It("[test_id:5919]should create configmaps for OCP Dashboard", Label("test_id:5919"), func() { | ||
It("[test_id:5919]should create configmaps for OCP Dashboard", Label("test_id:5919"), func(ctx context.Context) { | ||
By("Checking expected configmaps") | ||
s := scheme.Scheme | ||
_ = consolev1.Install(s) | ||
|
@@ -45,7 +45,7 @@ var _ = Describe("[rfe_id:5108][crit:medium][vendor:[email protected]][level:sys | |
} | ||
|
||
for _, item := range items { | ||
cm, err := cli.CoreV1().ConfigMaps(item.Namespace).Get(context.TODO(), item.Name, v1.GetOptions{}) | ||
cm, err := cli.CoreV1().ConfigMaps(item.Namespace).Get(ctx, item.Name, v1.GetOptions{}) | ||
ExpectWithOffset(1, err).ToNot(HaveOccurred()) | ||
for _, key := range item.Keys { | ||
_, ok := cm.Data[key] | ||
|
Oops, something went wrong.