Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
6020f38c
Commit
6020f38c
authored
Jun 16, 2021
by
Paul Gascou-Vaillancourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format network policies update time
Changelog: fixed EE: true
parent
5ea97472
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
ee/app/graphql/resolvers/network_policy_resolver.rb
ee/app/graphql/resolvers/network_policy_resolver.rb
+1
-1
ee/spec/graphql/resolvers/network_policy_resolver_spec.rb
ee/spec/graphql/resolvers/network_policy_resolver_spec.rb
+3
-3
No files found.
ee/app/graphql/resolvers/network_policy_resolver.rb
View file @
6020f38c
...
...
@@ -26,7 +26,7 @@ module Resolvers
{
name:
policy_json
[
:name
],
namespace:
policy_json
[
:namespace
],
updated_at:
policy_json
[
:creation_timestamp
]
,
updated_at:
Time
.
iso8601
(
policy_json
[
:creation_timestamp
])
,
yaml:
policy_json
[
:manifest
],
from_auto_devops:
policy_json
[
:is_autodevops
],
enabled:
policy_json
[
:is_enabled
]
...
...
ee/spec/graphql/resolvers/network_policy_resolver_spec.rb
View file @
6020f38c
...
...
@@ -8,13 +8,13 @@ RSpec.describe Resolvers::NetworkPolicyResolver do
let_it_be
(
:project
)
{
create
(
:project
)
}
let
(
:user
)
{
project
.
owner
}
let
(
:time_now
)
{
Time
.
current
}
let
(
:time_now
)
{
Time
.
utc
(
2021
,
6
,
16
)
}
let
(
:policy
)
do
Gitlab
::
Kubernetes
::
NetworkPolicy
.
new
(
name:
'policy'
,
namespace:
'another'
,
creation_timestamp:
time_now
,
creation_timestamp:
time_now
.
iso8601
,
selector:
{
matchLabels:
{
role:
'db'
}
},
ingress:
[{
from:
[{
namespaceSelector:
{
matchLabels:
{
project:
'myproject'
}
}
}]
}]
)
...
...
@@ -24,7 +24,7 @@ RSpec.describe Resolvers::NetworkPolicyResolver do
Gitlab
::
Kubernetes
::
CiliumNetworkPolicy
.
new
(
name:
'cilium_policy'
,
namespace:
'another'
,
creation_timestamp:
time_now
,
creation_timestamp:
time_now
.
iso8601
,
resource_version:
'102'
,
selector:
{
matchLabels:
{
role:
'db'
}
},
ingress:
[{
endpointFrom:
[{
matchLabels:
{
project:
'myproject'
}
}]
}]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment