Skip to content

Commit

Permalink
Merge pull request #49804 from aplanas/fix_parted_list
Browse files Browse the repository at this point in the history
parted: fix the ordering of list command
  • Loading branch information
Nicole Thomas authored Oct 23, 2018
2 parents 20c5949 + 1bb7b8a commit 2fa64f8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions salt/modules/parted.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,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

0 comments on commit 2fa64f8

Please sign in to comment.