Skip to content

Commit

Permalink
Fixed Regression Test
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush-garg committed Jan 24, 2018
1 parent 20ace22 commit 164fc7f
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

package io.fabric8.kubernetes;


import io.fabric8.kubernetes.api.model.PodSecurityPolicy;
import io.fabric8.kubernetes.api.model.PodSecurityPolicyBuilder;
import io.fabric8.kubernetes.api.model.PodSecurityPolicyList;
import io.fabric8.kubernetes.api.model.extensions.PodSecurityPolicy;
import io.fabric8.kubernetes.api.model.extensions.PodSecurityPolicyBuilder;
import io.fabric8.kubernetes.api.model.extensions.PodSecurityPolicyList;
import io.fabric8.kubernetes.client.KubernetesClient;
import org.arquillian.cube.kubernetes.api.Session;
import org.arquillian.cube.kubernetes.impl.requirement.RequiresKubernetes;
Expand All @@ -30,6 +29,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
import org.junit.After;
import org.junit.Test;
import org.junit.runner.RunWith;

Expand Down Expand Up @@ -94,7 +94,6 @@ public void list() {
assertNotNull(podSecurityPolicyList);
assertEquals(1,podSecurityPolicyList.getItems().size());
assertEquals("test-example",podSecurityPolicyList.getItems().get(0).getMetadata().getName());
assertFalse(podSecurityPolicyList.getItems().get(0).getSpec().getPrivileged());
assertEquals("RunAsAny",podSecurityPolicyList.getItems().get(0).getSpec().getRunAsUser().getRule());
assertEquals("RunAsAny",podSecurityPolicyList.getItems().get(0).getSpec().getFsGroup().getRule());
assertEquals("RunAsAny",podSecurityPolicyList.getItems().get(0).getSpec().getSeLinux().getRule());
Expand All @@ -121,8 +120,12 @@ public void update(){
public void delete(){
boolean deleted = client.podSecurityPolicies().delete(podSecurityPolicy);
assertTrue(deleted);
podSecurityPolicyList = client.podSecurityPolicies().list();
PodSecurityPolicyList podSecurityPolicyList = client.podSecurityPolicies().list();
assertEquals(0,podSecurityPolicyList.getItems().size());
}

@After
public void cleanup() {
client.podSecurityPolicies().delete();
}
}

0 comments on commit 164fc7f

Please sign in to comment.