Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

UserData Testcase #232

Open
wants to merge 3 commits into
base: testing
Choose a base branch
from

Conversation

hspencer77
Copy link
Member

Added UserData test to instancetest.py. The purpose of this test is to confirms if the userdata service is working correctly, and tests to make sure userdata of 16K size is accepted, per AWS spec.

For aesthetics, the user data value is a 16K file thats converted to string then compare,
"""
if self.user_data_file:
with open(self.user_data_file) as user_data_file:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we generate the 16K on the fly rather than adding a static file? You should be able to use self.tester.id_generator(16000)

@@ -55,6 +55,9 @@ def __init__( self, name="InstanceBasics", credpath=None, region=None, config_fi
self.address = None
self.volume = None
self.private_addressing = False
if not user_data:
### Set userdata string to 16K to test max string size for userdata
self.user_data = self.tester.id_generator(16000)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@hspencer77 I believe this change will break some test scenarios. Specifically when no user data is set we send a user data that enables root login.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants