Commit 452d0a4e authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch 'revert-365bcd8d' into 'master'

Revert "Merge branch 'add_standard_field_into_payload' into 'master'"

See merge request gitlab-org/gitlab!40162
parents f9087286 62d09256
......@@ -44,7 +44,6 @@ export const createPolicy = ({ state, commit }, { environmentId, policy }) => {
.post(state.policiesEndpoint, {
environment_id: environmentId,
manifest: policy.manifest,
is_standard: policy.isStandard,
})
.then(({ data }) => {
commit(types.RECEIVE_CREATE_POLICY_SUCCESS, data);
......@@ -72,7 +71,6 @@ export const updatePolicy = ({ state, commit }, { environmentId, policy }) => {
environment_id: environmentId,
manifest: policy.manifest,
enabled: policy.isEnabled,
is_standard: policy.isStandard,
})
.then(({ data }) => {
commit(types.RECEIVE_UPDATE_POLICY_SUCCESS, {
......
---
title: Revert Merge branch add_standard_field_into_payload into master
merge_request: 40162
author:
type: changed
......@@ -6,10 +6,10 @@ exports[`NetworkPolicyList component renders policies table 1`] = `
<table
aria-busy="false"
aria-colcount="3"
aria-describedby="__BVID__151__caption_"
aria-describedby="__BVID__143__caption_"
aria-multiselectable="false"
class="table b-table gl-table table-hover b-table-stacked-md b-table-selectable b-table-select-single"
id="__BVID__151"
id="__BVID__143"
role="table"
>
<!---->
......@@ -92,47 +92,6 @@ exports[`NetworkPolicyList component renders policies table 1`] = `
2 months ago
</div>
</td>
</tr>
<tr
aria-selected="false"
class=""
role="row"
tabindex="0"
>
<td
aria-colindex="1"
class=""
data-label="Name"
role="cell"
>
<div>
cilium_policy
</div>
</td>
<td
aria-colindex="2"
class=""
data-label="Status"
role="cell"
>
<div>
Enabled
</div>
</td>
<td
aria-colindex="3"
class=""
data-label="Last modified"
role="cell"
>
<div>
</div>
</td>
</tr>
......
......@@ -38,28 +38,6 @@ spec:
project: myproject`,
creation_timestamp: '2020-04-14T00:08:30Z',
is_enabled: true,
is_standard: true,
},
{
name: 'cilium_policy',
namespace: 'production',
manifest: `---
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: cilium_policy
namespace: production
spec:
endpointSelector:
matchLabels:
role: db
ingress:
- fromEndpoints:
- matchLabels:
project: myproject`,
created_timestamp: '2020-04-15T00:08:30Z',
is_enabled: true,
is_standard: false,
},
];
......
......@@ -19,7 +19,7 @@ describe('Network Policy actions', () => {
let state;
let mock;
const environmentId = 3;
const policy = { name: 'policy', manifest: 'foo', isEnabled: true, isStandard: true };
const policy = { name: 'policy', manifest: 'foo', isEnabled: true };
beforeEach(() => {
state = getInitialState();
......@@ -138,7 +138,7 @@ describe('Network Policy actions', () => {
});
describe('createPolicy', () => {
const createdPolicy = { name: 'policy', manifest: 'bar', isEnabled: true, isStandard: true };
const createdPolicy = { name: 'policy', manifest: 'bar', isEnabled: true };
describe('on success', () => {
beforeEach(() => {
......@@ -146,7 +146,6 @@ describe('Network Policy actions', () => {
.onPost(networkPoliciesEndpoint, {
environment_id: environmentId,
manifest: policy.manifest,
is_standard: true,
})
.replyOnce(httpStatus.OK, createdPolicy);
});
......@@ -177,7 +176,6 @@ describe('Network Policy actions', () => {
.onPost(networkPoliciesEndpoint, {
environment_id: environmentId,
manifest: policy.manifest,
is_standard: true,
})
.replyOnce(500, error);
});
......@@ -242,7 +240,7 @@ describe('Network Policy actions', () => {
});
describe('updatePolicy', () => {
const updatedPolicy = { name: 'policy', manifest: 'bar', isEnabled: true, isStandard: true };
const updatedPolicy = { name: 'policy', manifest: 'bar', isEnabled: true };
describe('on success', () => {
beforeEach(() => {
......@@ -251,7 +249,6 @@ describe('Network Policy actions', () => {
environment_id: environmentId,
manifest: policy.manifest,
enabled: policy.isEnabled,
is_standard: policy.isStandard,
})
.replyOnce(httpStatus.OK, updatedPolicy);
});
......@@ -281,7 +278,6 @@ describe('Network Policy actions', () => {
environment_id: environmentId,
manifest: policy.manifest,
enabled: policy.isEnabled,
is_standard: policy.isStandard,
})
.replyOnce(500, error);
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment