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

parted: fix the ordering of list command #49804

Merged
merged 2 commits into from
Oct 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions salt/modules/parted.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ def list_(device, unit=None):
'start': cols[1],
'end': cols[2],
'size': cols[3],
'type': cols[4],
'file system': cols[5],
'file system': cols[4],
'name': cols[5],
'flags': cols[6]}
else:
raise CommandExecutionError(
Expand Down
32 changes: 16 additions & 16 deletions tests/unit/modules/test_parted.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,17 +207,17 @@ def test_list__valid_cmd_output(self):
'end': '150MB',
'number': '1',
'start': '17.4kB',
'file system': '',
'file system': 'ext3',
'flags': 'boot',
'type': 'ext3',
'name': '',
'size': '150MB'},
'2': {
'end': '4000GB',
'number': '2',
'start': '3921GB',
'file system': '',
'file system': 'linux-swap(v1)',
'flags': '',
'type': 'linux-swap(v1)',
'name': '',
'size': '79.3GB'
}
}
Expand Down Expand Up @@ -245,17 +245,17 @@ def test_list__valid_unit_valid_cmd_output(self):
'end': '150MB',
'number': '1',
'start': '17.4kB',
'file system': '',
'file system': 'ext3',
'flags': 'boot',
'type': 'ext3',
'name': '',
'size': '150MB'},
'2': {
'end': '4000GB',
'number': '2',
'start': '3921GB',
'file system': '',
'file system': 'linux-swap(v1)',
'flags': '',
'type': 'linux-swap(v1)',
'name': '',
'size': '79.3GB'
}
}
Expand All @@ -282,17 +282,17 @@ def test_list__valid_legacy_cmd_output(self):
'end': '150MB',
'number': '1',
'start': '17.4kB',
'file system': '',
'file system': 'ext3',
'flags': 'boot',
'type': 'ext3',
'name': '',
'size': '150MB'},
'2': {
'end': '4000GB',
'number': '2',
'start': '3921GB',
'file system': '',
'file system': 'linux-swap(v1)',
'flags': '',
'type': 'linux-swap(v1)',
'name': '',
'size': '79.3GB'
}
}
Expand All @@ -319,17 +319,17 @@ def test_list__valid_unit_valid_legacy_cmd_output(self):
'end': '150MB',
'number': '1',
'start': '17.4kB',
'file system': '',
'file system': 'ext3',
'flags': 'boot',
'type': 'ext3',
'name': '',
'size': '150MB'},
'2': {
'end': '4000GB',
'number': '2',
'start': '3921GB',
'file system': '',
'file system': 'linux-swap(v1)',
'flags': '',
'type': 'linux-swap(v1)',
'name': '',
'size': '79.3GB'
}
}
Expand Down