Skip to content

Commit

Permalink
Deprecate k6 convert
Browse files Browse the repository at this point in the history
closes #1124
  • Loading branch information
mstoykov committed Oct 5, 2022
1 parent e40bd3f commit 73ee390
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cmd/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ func getCmdConvert(globalState *globalState) *cobra.Command {
skip []string
)
convertCmd := &cobra.Command{
Use: "convert",
Short: "Convert a HAR file to a k6 script",
Long: "Convert a HAR (HTTP Archive) file to a k6 script",
Use: "convert",
Short: "Convert a HAR file to a k6 script",
Long: "Convert a HAR (HTTP Archive) file to a k6 script",
Deprecated: "please use har-to-k6 (https://github.com/loadimpact/har-to-k6) instead.",
Example: `
# Convert a HAR file to a k6 script.
k6 convert -O har-session.js session.har
Expand Down
2 changes: 1 addition & 1 deletion cmd/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func TestConvertCmdStdout(t *testing.T) {
testState.args = []string{"k6", "convert", "stdout.har"}

newRootCommand(testState.globalState).execute()
assert.Equal(t, testHARConvertResult, testState.stdOut.String())
assert.Equal(t, "Command \"convert\" is deprecated, please use har-to-k6 (https://github.com/loadimpact/har-to-k6) instead.\n"+testHARConvertResult, testState.stdOut.String())
}

func TestConvertCmdOutputFile(t *testing.T) {
Expand Down

0 comments on commit 73ee390

Please sign in to comment.