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
3a1a12b3
Commit
3a1a12b3
authored
Apr 01, 2019
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix cert_manager_spec to not modify String
Also break up long string to be readable
parent
a2cfc150
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
3 deletions
+24
-3
spec/models/clusters/applications/cert_manager_spec.rb
spec/models/clusters/applications/cert_manager_spec.rb
+24
-3
No files found.
spec/models/clusters/applications/cert_manager_spec.rb
View file @
3a1a12b3
...
...
@@ -11,7 +11,27 @@ describe Clusters::Applications::CertManager do
include_examples
'cluster application initial status specs'
describe
'#install_command'
do
let
(
:cluster_issuer_file
)
{
{
"cluster_issuer.yaml"
:
"---
\n
apiVersion: certmanager.k8s.io/v1alpha1
\n
kind: ClusterIssuer
\n
metadata:
\n
name: letsencrypt-prod
\n
spec:
\n
acme:
\n
server: https://acme-v02.api.letsencrypt.org/directory
\n
email: admin@example.com
\n
privateKeySecretRef:
\n
name: letsencrypt-prod
\n
http01: {}
\n
"
}
}
let
(
:cert_email
)
{
'admin@example.com'
}
let
(
:cluster_issuer_file
)
do
file_contents
=
<<~
EOF
---
apiVersion: certmanager.k8s.io/v1alpha1
kind: ClusterIssuer
metadata:
name: letsencrypt-prod
spec:
acme:
server: https://acme-v02.api.letsencrypt.org/directory
email:
#{
cert_email
}
privateKeySecretRef:
name: letsencrypt-prod
http01: {}
EOF
{
"cluster_issuer.yaml"
:
file_contents
}
end
subject
{
cert_manager
.
install_command
}
it
{
is_expected
.
to
be_an_instance_of
(
Gitlab
::
Kubernetes
::
Helm
::
InstallCommand
)
}
...
...
@@ -26,9 +46,10 @@ describe Clusters::Applications::CertManager do
end
context
'for a specific user'
do
let
(
:cert_email
)
{
'abc@xyz.com'
}
before
do
cert_manager
.
email
=
'abc@xyz.com'
cluster_issuer_file
[
:'cluster_issuer.yaml'
].
gsub!
'admin@example.com'
,
'abc@xyz.com'
cert_manager
.
email
=
cert_email
end
it
'should use his/her email to register issuer with certificate provider'
do
...
...
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