Skip to content
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

Merged

Conversation

elyezer
Copy link
Contributor

@elyezer elyezer commented Feb 26, 2015

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.

@@ -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'))
Copy link
Contributor Author

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>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Internal/External

@Ichimonji10
Copy link
Contributor

Great job. ACK pending comments.

# 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
Copy link
Member

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.

@omaciel
Copy link
Member

omaciel commented Feb 26, 2015

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.
@elyezer elyezer force-pushed the docker-compute-resource-tests branch from e9d0392 to 67a8ef1 Compare February 27, 2015 14:36
@Ichimonji10
Copy link
Contributor

Looks great. @omaciel's comment has been addressed too.

Ichimonji10 added a commit that referenced this pull request Feb 27, 2015
Add docker compute resource API creation tests
@Ichimonji10 Ichimonji10 merged commit a352e6f into SatelliteQE:master Feb 27, 2015
@elyezer elyezer deleted the docker-compute-resource-tests branch February 27, 2015 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants