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 windows integration tests for states.file #48742

Merged
merged 4 commits into from Jul 27, 2018

Conversation

Projects
None yet
3 participants
@frogunder
Contributor

frogunder commented Jul 24, 2018

What issues does this PR fix or reference?

#45014

@rallytime

This comment has been minimized.

Contributor

rallytime commented Jul 24, 2018

Hey @frogunder - There is a conflicting file in this change. Can you rebase and fix that?

@rallytime rallytime requested a review from Ch3LL Jul 24, 2018

Test for the file state on Windows
'''
def setUp(self):
self.test = self.run_state('file.managed', name='c:/testfile', makedirs=True, contents='Only a test')

This comment has been minimized.

@Ch3LL

Ch3LL Jul 26, 2018

Contributor

since we aren't using this self.test variable anywhere else in the test i think we can just remove this and remove the tearDown() del self.test and just call the run_state

self.test = self.run_state('file.managed', name='c:/testfile', makedirs=True, contents='Only a test')
def tearDown(self):
del self.test

This comment has been minimized.

@Ch3LL

Ch3LL Jul 26, 2018

Contributor

since we are adding a file in the setUp we need to make sure are deleting that file in the tearDown

Test file.comment on Windows
'''
self.run_state('file.comment', name='c:/testfile', regex='^Only')
file = 'c:/testfile'

This comment has been minimized.

@Ch3LL

Ch3LL Jul 26, 2018

Contributor

since it looks like you are using c:/testfile in a lot of cases here might be better to set as a class variable

frogunder added some commits Jul 26, 2018

@Ch3LL

Ch3LL approved these changes Jul 26, 2018

@rallytime rallytime merged commit 8e61f3d into saltstack:2017.7 Jul 27, 2018

5 of 8 checks passed

continuous-integration/jenkins/pr-merge This commit cannot be built
Details
jenkins/pr/py3-centos-7 The py3-centos-7 job has failed
Details
jenkins/pr/py3-ubuntu-1604 The py3-ubuntu-1604 job has failed
Details
WIP ready for review
Details
jenkins/pr/docs The docs job has passed
Details
jenkins/pr/lint The lint job has passed
Details
jenkins/pr/py2-centos-7 The py2-centos-7 job has passed
Details
jenkins/pr/py2-ubuntu-1604 The py2-ubuntu-1604 job has passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment