https://codereview.appspot.com/7194043/diff/1/client/local_test.go#newcode42
client/local_test.go:42: // The openstack test service sets up userpass
authentication.
On 2013/01/23 12:28:08, dimitern wrote:
> As on the other CL, think what happens if OS_TENANT_NAME is not set -
maybe pass
> it as an argument here?
The tenant was hard wired, so no issue. However, I've tweaked it so that
the openstack service double is constructed using a credentials object
and the tenant to use comes from there.
The statically defined array was replaced with a function to allow the
token to be dynamically set in the struct values, since the token is no
longer hard wired. So the function return type and array declaration
inside the function needed to refer to the struct, and so using a type
became necessary.
https:/ /codereview. appspot. com/7194043/ diff/1/ client/ local_test. go local_test. go (right):
File client/
https:/ /codereview. appspot. com/7194043/ diff/1/ client/ local_test. go#newcode42 local_test. go:42: // The openstack test service sets up userpass
client/
authentication.
On 2013/01/23 12:28:08, dimitern wrote:
> As on the other CL, think what happens if OS_TENANT_NAME is not set -
maybe pass
> it as an argument here?
The tenant was hard wired, so no issue. However, I've tweaked it so that
the openstack service double is constructed using a credentials object
and the tenant to use comes from there.
https:/ /codereview. appspot. com/7194043/ diff/1/ testservices/ novaservice/ service_ http_test. go novaservice/ service_ http_test. go (right):
File testservices/
https:/ /codereview. appspot. com/7194043/ diff/1/ testservices/ novaservice/ service_ http_test. go#newcode120 novaservice/ service_ http_test. go:120: // SimpleTest defines
testservices/
a simple request without a body and expected response.
On 2013/01/23 12:28:08, dimitern wrote:
> Why a type, when it's only used here?
The statically defined array was replaced with a function to allow the
token to be dynamically set in the struct values, since the token is no
longer hard wired. So the function return type and array declaration
inside the function needed to refer to the struct, and so using a type
became necessary.
https:/ /codereview. appspot. com/7194043/