-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add docker compute resource API creation tests #1946
Add docker compute resource API creation tests #1946
Conversation
@@ -296,13 +298,22 @@ class ComputeResource( | |||
"""A representation of a Compute Resource entity.""" | |||
description = entity_fields.StringField(null=True) | |||
# `name` cannot contain whitespace. Thus, the chosen string types. | |||
name = entity_fields.StringField(null=True, str_type=('alphanumeric', 'cjk')) | |||
name = entity_fields.StringField( | |||
required=True, str_type=('alphanumeric', 'cjk')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API docs now shows name as being required
# {server_hostname} variable can be used and will be replaced by | ||
# main.server.hostname value. | ||
internal_url=http://{server_hostname}:2375 | ||
# Internal docker URL in the format http[s]://<server>:<port>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Internal/External
Great job. ACK |
# Internal docker URL in the format http[s]://<server>:<port>. The | ||
# {server_hostname} variable can be used and will be replaced by | ||
# main.server.hostname value. | ||
internal_url=http://{server_hostname}:2375 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be internal_url=http://localhost:2375
instead.
ACK pending comments |
Before writing the tests was needed to: * Update ComputeResource to deal with the Docker provider. * Add configuration in the robottelo.properties file to configure the docker internal and external server URLs. * Add helpers to get the internal and external docker server URLs. This will make easier to get the config without having to deal with the config object every time. The above allowed write tests for creating internal and external Docker-based compute resources, also added on this commit.
e9d0392
to
67a8ef1
Compare
Looks great. @omaciel's comment has been addressed too. |
Add docker compute resource API creation tests
Before writing the tests was needed to:
docker internal and external server URLs.
will make easier to get the config without having to deal with the
config object every time.
The above allowed write tests for creating internal and external
Docker-based compute resources, also added on this commit.