Skip to content

Commit

Permalink
fix bug --cpu-shares parsing typo
Browse files Browse the repository at this point in the history
close #1464

fix the paring typo cpu-shared of --cpu-shares.
fix expect value in from.bats

Signed-off-by: Qi Wang <[email protected]>

Closes: #1662
Approved by: TomSweeneyRedHat
  • Loading branch information
QiWang19 authored and rh-atomic-bot committed Jun 10, 2019
1 parent 4ae0a69 commit 78dcf2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/parse/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func CommonBuildOptions(c *cobra.Command) (*buildah.CommonBuildOptions, error) {
}
cpuPeriod, _ := c.Flags().GetUint64("cpu-period")
cpuQuota, _ := c.Flags().GetInt64("cpu-quota")
cpuShares, _ := c.Flags().GetUint64("cpu-shared")
cpuShares, _ := c.Flags().GetUint64("cpu-shares")
httpProxy, _ := c.Flags().GetBool("http-proxy")
ulimit, _ := c.Flags().GetStringSlice("ulimit")
commonOpts := &buildah.CommonBuildOptions{
Expand Down
2 changes: 1 addition & 1 deletion tests/from.bats
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ load helpers
fi
cid=$(buildah from --cpu-shares=2 --pull --signature-policy ${TESTSDIR}/policy.json alpine)
run_buildah --debug=false run $cid cat /sys/fs/cgroup/cpu/cpu.shares
expect_output "1024"
expect_output "2"
buildah rm $cid
}

Expand Down

0 comments on commit 78dcf2f

Please sign in to comment.