Skip to content

Commit

Permalink
Remove redundant E2E test
Browse files Browse the repository at this point in the history
The E2E test is redundant after medik8s#48 PR, and it also fails here when we try to add/remove taint for a node which doesn't exist - dummy-node
  • Loading branch information
razo7 committed Jun 14, 2023
1 parent e883932 commit 7149fb8
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions test/e2e/far_e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,29 +49,8 @@ var _ = Describe("FAR E2e", func() {
fmt.Printf("\ncluster name: %s and PlatformType: %s \n", string(clusterPlatform.Name), string(clusterPlatform.Status.PlatformStatus.Type))
})

Context("fence agent - dummy", func() {
testNodeName := "dummy-node"
fenceAgent = fenceAgentDummyName

BeforeEach(func() {
testShareParam := map[v1alpha1.ParameterName]string{}
testNodeParam := map[v1alpha1.ParameterName]map[v1alpha1.NodeName]string{}
far = createFAR(testNodeName, fenceAgent, testShareParam, testNodeParam)
})

AfterEach(func() {
deleteFAR(far)
})

It("should check whether the CR has been created", func() {
testFarCR := &v1alpha1.FenceAgentsRemediation{}
Expect(k8sClient.Get(context.Background(), client.ObjectKeyFromObject(far), testFarCR)).To(Succeed(), "failed to get FAR CR")
})
})

Context("fence agent - non-Dummy", func() {
Context("fence agent", func() {
BeforeEach(func() {
var testNodeName string
nodes := &corev1.NodeList{}
Expect(k8sClient.List(context.Background(), nodes, &client.ListOptions{})).ToNot(HaveOccurred())
if len(nodes.Items) <= 1 {
Expand All @@ -80,7 +59,7 @@ var _ = Describe("FAR E2e", func() {
//TODO: Randomize the node selection
// run FA on the first node - a master node
nodeObj := nodes.Items[nodeIndex]
testNodeName = nodeObj.Name
testNodeName := nodeObj.Name
log.Info("Testing Node", "Node name", testNodeName)

switch clusterPlatform.Status.PlatformStatus.Type {
Expand Down

0 comments on commit 7149fb8

Please sign in to comment.