11#!/usr/bin/env python
2- # Copyright (C) 2015, 2019 IBM Corp. All rights reserved.
2+ # Copyright (C) 2015, 2020 IBM Corp. All rights reserved.
33#
44# Licensed under the Apache License, Version 2.0 (the "License");
55# you may not use this file except in compliance with the License.
@@ -109,15 +109,15 @@ def setUpClass(cls):
109109
110110 if os .environ .get ('DB_USER' ) is None :
111111 # Get couchdb docker node name
112- if os .environ .get ('COUCHDB_VERSION' ) == '2.1 .1' :
112+ if os .environ .get ('COUCHDB_VERSION' ) == '2.3 .1' :
113113 os .environ ['NODENAME' ] = requests .get (
114114 '{0}/_membership' .format (os .environ ['DB_URL' ])).json ()['all_nodes' ][0 ]
115115 os .environ ['DB_USER_CREATED' ] = '1'
116116 os .environ ['DB_USER' ] = 'user-{0}' .format (
117117 unicode_ (uuid .uuid4 ())
118118 )
119119 os .environ ['DB_PASSWORD' ] = 'password'
120- if os .environ .get ('COUCHDB_VERSION' ) == '2.1 .1' :
120+ if os .environ .get ('COUCHDB_VERSION' ) == '2.3 .1' :
121121 resp = requests .put (
122122 '{0}/_node/{1}/_config/admins/{2}' .format (
123123 os .environ ['DB_URL' ],
@@ -143,7 +143,7 @@ def tearDownClass(cls):
143143 """
144144 if (os .environ .get ('RUN_CLOUDANT_TESTS' ) is None and
145145 os .environ .get ('DB_USER_CREATED' ) is not None ):
146- if os .environ .get ('COUCHDB_VERSION' ) == '2.1 .1' :
146+ if os .environ .get ('COUCHDB_VERSION' ) == '2.3 .1' :
147147 resp = requests .delete (
148148 '{0}://{1}:{2}@{3}/_node/{4}/_config/admins/{5}' .format (
149149 os .environ ['DB_URL' ].split ('://' , 1 )[0 ],
0 commit comments