Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
0
Merge Requests
0
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
Thomas Gambier
slapos
Commits
b13ba7f7
Commit
b13ba7f7
authored
Mar 04, 2021
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Plain Diff
Repman: update golang
See merge request
nexedi/slapos!925
parents
8cfaf8d2
19a3b217
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
24 deletions
+40
-24
component/replication-manager/buildout.cfg
component/replication-manager/buildout.cfg
+0
-1
component/restic/buildout.cfg
component/restic/buildout.cfg
+0
-3
software/repman/test/setup.py
software/repman/test/setup.py
+0
-3
software/repman/test/test.py
software/repman/test/test.py
+40
-17
No files found.
component/replication-manager/buildout.cfg
View file @
b13ba7f7
...
...
@@ -6,7 +6,6 @@ parts =
gowork
[gowork]
golang = ${golang1.13:location}
install =
buildflags = -v --tags server --ldflags "-extldflags 'static' -w -s -X main.GoOS=linux -X main.GoArch=amd64 -X main.Version=2.1 -X main.FullVersion=$FULLVERSION -X main.Build=$(date +%FT%T%z) -X main.WithProvisioning=ON -X main.WithOpenSVC=OFF -X main.WithHaproxy=ON -X main.WithMaxscale=ON -X main.WithMariadbshardproxy=ON -X main.WithProxysql=ON -X main.WithSphinx=ON -X main.WithArbitration=OFF -X main.WithArbitrationClient=ON -X main.WithMonitoring=ON -X main.WithHttp=ON -X main.WithBackup=ON -X main.WithMail=ON -X main.WithEnforce=ON -X main.WithDeprecate=ON"
...
...
component/restic/buildout.cfg
View file @
b13ba7f7
...
...
@@ -5,9 +5,6 @@ extends =
parts =
restic
[gowork]
golang = ${golang1.13:location}
[restic]
recipe = plone.recipe.command
...
...
software/repman/test/setup.py
View file @
b13ba7f7
...
...
@@ -43,9 +43,6 @@ setup(
install_requires
=
[
'slapos.core'
,
'slapos.libnetworkcache'
,
'erp5.util'
,
'supervisor'
,
'pexpect'
,
'requests'
,
],
zip_safe
=
True
,
...
...
software/repman/test/test.py
View file @
b13ba7f7
...
...
@@ -24,16 +24,10 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
__future__
import
unicode_literals
import
os
import
textwrap
import
logging
import
tempfile
import
time
from
six.moves.urllib.parse
import
urlparse
,
urljoin
from
six.moves.urllib.parse
import
urljoin
import
pexpect
import
requests
from
slapos.testing.testcase
import
makeModuleSetUpAndTestCaseClass
...
...
@@ -44,17 +38,46 @@ setUpModule, SlapOSInstanceTestCase = makeModuleSetUpAndTestCaseClass(
class
TestRepman
(
SlapOSInstanceTestCase
):
__partition_reference__
=
'R'
# solve path too long for postgresql and unicorn
@
classmethod
def
getInstanceSoftwareType
(
cls
):
return
'default'
__partition_reference__
=
'R'
def
setUp
(
self
):
self
.
backend_url
=
self
.
computer_partition
.
getConnectionParameterDict
(
)[
'backend-url'
]
self
.
url
=
self
.
computer_partition
.
getConnectionParameterDict
()[
'url'
]
def
test_http_get
(
self
):
resp
=
requests
.
get
(
self
.
backend_url
,
verify
=
False
)
self
.
assertTrue
(
resp
.
status_code
in
[
requests
.
codes
.
ok
,
requests
.
codes
.
found
])
connection_parameter_dict
=
\
self
.
computer_partition
.
getConnectionParameterDict
()
resp
=
requests
.
get
(
self
.
url
,
verify
=
False
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
resp
=
requests
.
post
(
urljoin
(
self
.
url
,
'/api/login'
),
json
=
{
'username'
:
connection_parameter_dict
[
'username'
],
'password'
:
connection_parameter_dict
[
'repman-password'
],
},
verify
=
False
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
token
=
resp
.
json
()[
'token'
]
headers
=
{
"authorization"
:
"Bearer "
+
token
}
resp
=
requests
.
get
(
urljoin
(
self
.
url
,
'/api/monitor'
),
headers
=
headers
,
verify
=
False
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
resp
=
requests
.
get
(
urljoin
(
self
.
url
,
'/api/clusters'
),
params
=
{
'query'
:
'{"method":"GET","isArray":false}'
,
},
headers
=
headers
,
verify
=
False
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
ok
)
cluster
,
=
resp
.
json
()
self
.
assertTrue
(
cluster
[
'isProvision'
])
self
.
assertTrue
(
cluster
[
'isFailable'
])
self
.
assertFalse
(
cluster
[
'isDown'
])
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