Skip to content

Commit 0910e2e

Browse files
authored
fix: typos (#593)
Signed-off-by: francois samin <[email protected]>
1 parent 6259c5d commit 0910e2e

27 files changed

+61
-61
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Venom is a CLI (Command Line Interface) that aim to create, manage and run your
55
<a href="https://github.com/ovh/venom/releases/latest"><img alt="GitHub release" src="https://img.shields.io/github/v/release/ovh/venom.svg?logo=github&style=flat-square"></a>
66
[![GoDoc](https://godoc.org/github.com/ovh/venom?status.svg)](https://godoc.org/github.com/ovh/venom)
77
[![Go Report Card](https://goreportcard.com/badge/github.com/ovh/venom)](https://goreportcard.com/report/github.com/ovh/venom)
8-
[![Dicussions](https://img.shields.io/badge/Discussions-OVHcloud-brightgreen)](https://github.com/ovh/venom/discussions)
8+
[![Discussions](https://img.shields.io/badge/Discussions-OVHcloud-brightgreen)](https://github.com/ovh/venom/discussions)
99
<a href="https://gitpod.io/#https://github.com/ovh/venom"><img src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod" alt="Contribute with Gitpod"/></a>
1010

1111
# Table of content
@@ -162,7 +162,7 @@ Flags:
162162
--output-dir string Output Directory: create tests results file inside this directory
163163
--stop-on-failure Stop running Test Suite on first Test Case failure
164164
--var stringArray --var cds='cds -f config.json' --var cds2='cds -f config.json'
165-
--var-from-file strings --var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionnary
165+
--var-from-file strings --var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionary
166166
-v, --verbose count verbose. -vv to very verbose and -vvv to very verbose with CPU Profiling
167167
```
168168

@@ -237,7 +237,7 @@ Flags:
237237
--output-dir string Output Directory: create tests results file inside this directory
238238
--stop-on-failure Stop running Test Suite on first Test Case failure
239239
--var stringArray --var cds='cds -f config.json' --var cds2='cds -f config.json'
240-
--var-from-file strings --var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionnary
240+
--var-from-file strings --var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionary
241241
-v, --verbose count verbose. -vv to very verbose and -vvv to very verbose with CPU Profiling
242242
```
243243

@@ -647,7 +647,7 @@ Example:
647647

648648
### Using logical operators
649649

650-
While assertions use `and` operator implicitely, it is possible to use other logical operators to perform complex assertions.
650+
While assertions use `and` operator implicitly, it is possible to use other logical operators to perform complex assertions.
651651

652652
Supported operators are `and`, `or` and `xor`.
653653

@@ -858,7 +858,7 @@ The following data types are supported, each exposing contexted variables `.inde
858858

859859
For instance, the following example will iterate over an array of two items containing maps:
860860
```yaml
861-
- name: range with harcoded array
861+
- name: range with hardcoded array
862862
steps:
863863
- type: exec
864864
range:

assertion.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,11 @@ func checkBranch(ctx context.Context, tc TestCase, stepNumber int, rangedIndex i
195195
err = fmt.Errorf("no assertions succeeded:\n%s\n", strings.Join(results, "\n"))
196196
}
197197
if assertionsSuccess > 1 {
198-
err = fmt.Errorf("multiple assertions succeeded but expected only one to suceed:\n%s\n", strings.Join(results, "\n"))
198+
err = fmt.Errorf("multiple assertions succeeded but expected only one to succeed:\n%s\n", strings.Join(results, "\n"))
199199
}
200200
case "not":
201201
if assertionsSuccess > 0 {
202-
err = fmt.Errorf("some assertions succeeded but expected none to suceed:\n%s\n", strings.Join(results, "\n"))
202+
err = fmt.Errorf("some assertions succeeded but expected none to succeed:\n%s\n", strings.Join(results, "\n"))
203203
}
204204
default:
205205
return newFailure(ctx, tc, stepNumber, rangedIndex, "", fmt.Errorf("unsupported assertion operator %s", operator))

assertions/assertions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func ShouldBeMap(actual interface{}, expected ...interface{}) error {
110110
//
111111
func ShouldEqual(actual interface{}, expected ...interface{}) error {
112112
// if expected is an array, we consider that this array is an array of string
113-
// so, we concat all values before doing the comparaison
113+
// so, we concat all values before doing the comparison
114114
if len(expected) > 0 {
115115
var args string
116116
for i := range expected {

cmd/venom/run/cmd.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func init() {
4949
stopOnFailureFlag = Cmd.Flags().Bool("stop-on-failure", false, "Stop running Test Suite on first Test Case failure")
5050
htmlReportFlag = Cmd.Flags().Bool("html-report", false, "Generate HTML Report")
5151
verboseFlag = Cmd.Flags().CountP("verbose", "v", "verbose. -vv to very verbose and -vvv to very verbose with CPU Profiling")
52-
varFilesFlag = Cmd.Flags().StringSlice("var-from-file", []string{""}, "--var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionnary")
52+
varFilesFlag = Cmd.Flags().StringSlice("var-from-file", []string{""}, "--var-from-file filename.yaml --var-from-file filename2.yaml: yaml, must contains a dictionary")
5353
variablesFlag = Cmd.Flags().StringArray("var", nil, "--var cds='cds -f config.json' --var cds2='cds -f config.json'")
5454
outputDirFlag = Cmd.PersistentFlags().String("output-dir", "", "Output Directory: create tests results file inside this directory")
5555
libDirFlag = Cmd.PersistentFlags().String("lib-dir", "", "Lib Directory: can contain user executors. example:/etc/venom/lib:$HOME/venom.d/lib")

executors/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ func (Executor) Run(ctx context.Context, step venom.TestStep) (interface{}, erro
5757
//...
5858

5959
systemout := "foo"
60-
ouputCode := 0
60+
outputCode := 0
6161

6262
// prepare result
6363
r := Result{
64-
Code: ouputCode, // return Output Code
64+
Code: outputCode, // return Output Code
6565
Command: e.Command, // return Command executed
6666
Systemout: systemout, // return Output string
6767
}

executors/exec/exec.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func (Executor) Run(ctx context.Context, step venom.TestStep) (interface{}, erro
148148
for {
149149
line, errs := stdoutreader.ReadString('\n')
150150
if errs != nil {
151-
// ReadString returns what has been read even though an error was encoutered
151+
// ReadString returns what has been read even though an error was encountered
152152
// ie. capture outputs with no '\n' at the end
153153
result.Systemout += line
154154
stdout.Close()
@@ -165,7 +165,7 @@ func (Executor) Run(ctx context.Context, step venom.TestStep) (interface{}, erro
165165
for {
166166
line, errs := stderrreader.ReadString('\n')
167167
if errs != nil {
168-
// ReadString returns what has been read even though an error was encoutered
168+
// ReadString returns what has been read even though an error was encountered
169169
// ie. capture outputs with no '\n' at the end
170170
result.Systemerr += line
171171
stderr.Close()

executors/http/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ In your yaml file, you can use:
1717
- proxy (optional): set to use a proxy server for connection to url
1818
- resolve (optional): array of custom resolver of host and port pair. example: foo.com:443:127.0.0.1
1919
- ignore_verify_ssl (optional): set to true if you use a self-signed SSL on remote for example
20-
- basic_auth_user (optional): username to use for HTTP basic authentification
21-
- basic_auth_password (optional): password to use for HTTP basic authentification
20+
- basic_auth_user (optional): username to use for HTTP basic authentication
21+
- basic_auth_password (optional): password to use for HTTP basic authentication
2222
- no_follow_redirect (optional): indicates that you don't want to follow Location if server returns a Redirect (301/302/...)
2323
- skip_body: skip the body and bodyjson result
2424
- skip_headers: skip the headers result

executors/kafka/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ In your yaml file, you can use:
1414
- with_avro optional - describes if this test should expect Avro schema to be used. NOTE if you used it for consumer, you will have to use it for Producer too.
1515
- user optional
1616
- password optional
17-
- kafka_version optional, defaut is 0.10.2.0
17+
- kafka_version optional, default is 0.10.2.0
1818

1919
- client_type mandator: producer or consumer
2020

executors/kafka/kafka.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ func (e Executor) consumeMessages(ctx context.Context) ([]Message, []interface{}
298298

299299
consumerGroup, err := sarama.NewConsumerGroup(e.Addrs, e.GroupID, config)
300300
if err != nil {
301-
return nil, nil, fmt.Errorf("error instanciate consumer err: %w", err)
301+
return nil, nil, fmt.Errorf("error instantiate consumer err: %w", err)
302302
}
303303
defer func() { _ = consumerGroup.Close() }()
304304

executors/plugins/odbc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Step to execute SQL queries into databases:
2424

2525
* **ODBC**
2626

27-
It use the package `sqlx` under the hood: https://github.com/jmoiron/sqlx to retreive rows as a list of map[string]interface{}
27+
It use the package `sqlx` under the hood: https://github.com/jmoiron/sqlx to retrieve rows as a list of map[string]interface{}
2828

2929
## Input
3030

executors/rabbitmq/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ testcases:
5858
- value: '{"a": "b"}'
5959
contentType: application/json
6060
contentEncoding: utf8
61-
persistant: false
61+
persistent: false
6262
headers:
6363
myCustomHeader: value
6464
myCustomHeader2: value2
@@ -110,7 +110,7 @@ testcases:
110110
- value: '{"a": "b"}'
111111
contentType: application/json
112112
contentEncoding: utf8
113-
persistant: false
113+
persistent: false
114114
headers:
115115
myCustomHeader: value
116116
myCustomHeader2: value2

executors/rabbitmq/rabbitmq.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type Executor struct {
4848
Exchange string `json:"exchange" yaml:"exchange"`
4949
// RoutingKey represents the RabbitMQ routing key
5050
ExchangeType string `json:"exchange_type" yaml:"exchangeType"`
51-
// ExchangeType respresents the type of exchange (fanout, etc..)
51+
// ExchangeType represents the type of exchange (fanout, etc..)
5252
RoutingKey string `json:"routing_key" yaml:"routingKey"`
5353

5454
// Represents the limit of message will be read. After limit, consumer stop read message
@@ -241,7 +241,7 @@ func (e Executor) consumeMessages(ctx context.Context) ([]string, []interface{},
241241
if err != nil {
242242
return nil, nil, nil, nil, err
243243
}
244-
venom.Debug(ctx, "Q declated '%s'", q.Name)
244+
venom.Debug(ctx, "Q declared '%s'", q.Name)
245245

246246
// If an exchange if defined
247247
if e.Exchange != "" {

executors/readfile/readfile.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ func (e *Executor) readfile(workdir string) (Result, error) {
113113
mod := make(map[string]string)
114114

115115
for _, f := range filesPath {
116-
f, erro := os.Open(f)
117-
if erro != nil {
118-
return result, fmt.Errorf("Error while opening file: %s", erro)
116+
f, error := os.Open(f)
117+
if error != nil {
118+
return result, fmt.Errorf("Error while opening file: %s", error)
119119
}
120120
defer f.Close()
121121

executors/redis/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Use case: your software need to make call to a Redis.
66

77
## Input
88

9-
The follwing inputs are available:
9+
The following inputs are available:
1010
- `commands`: an array of Redis command
1111
- `path`: a file which contains a series of Redis command. If path property is filled, commands property will be ignored.
1212
- `dialURL`: Redis server URL
@@ -54,7 +54,7 @@ testcases:
5454
steps:
5555
- type: redis
5656
path: testredis/commands.txt
57-
dialURL: "redis://localhost:6379/0" # The global dialURL is overriden by this setting
57+
dialURL: "redis://localhost:6379/0" # The global dialURL is overridden by this setting
5858
assertions:
5959
- result.commands.commands0.response ShouldEqual OK
6060
- result.commands.commands1.response ShouldEqual bar

executors/sql/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Step to execute SQL queries into databases:
55
* **PostgreSQL**
66
* **Oracle**
77

8-
It use the package `sqlx` under the hood: https://github.com/jmoiron/sqlx to retreive rows as a list of map[string]interface{}
8+
It use the package `sqlx` under the hood: https://github.com/jmoiron/sqlx to retrieve rows as a list of map[string]interface{}
99

1010
## Input
1111

executors/web/types.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,40 +17,40 @@ type Action struct {
1717
HistoryAction string `yaml:"historyAction,omitempy"`
1818
}
1919

20-
// Fill represents informations needed to fill input/textarea
20+
// Fill represents information needed to fill input/textarea
2121
type Fill struct {
2222
Find string `yaml:"find,omitempty"`
2323
Text string `yaml:"text,omitempty"`
2424
Key *string `yaml:"key,omitempty"`
2525
}
2626

27-
// Click represents informations needed to click on web components
27+
// Click represents information needed to click on web components
2828
type Click struct {
2929
Find string `yaml:"find,omitempty"`
3030
Wait int64 `yaml:"wait"`
3131
}
3232

33-
// Navigate represents informations needed to navigate on defined url
33+
// Navigate represents information needed to navigate on defined url
3434
type Navigate struct {
3535
URL string `yaml:"url,omitempty"`
3636
Reset bool `yaml:"reset,omitempty"`
3737
}
3838

39-
// Select represents informations needed to select an option
39+
// Select represents information needed to select an option
4040
type Select struct {
4141
Find string `yaml:"find,omitempty"`
4242
Text string `yaml:"text,omitempty"`
4343
Wait int64 `yaml:"wait,omitempty"`
4444
}
4545

46-
// UploadFile represents informations needed to upload files
46+
// UploadFile represents information needed to upload files
4747
type UploadFile struct {
4848
Find string `yaml:"find,omitempty"`
4949
Files []string `yaml:"files,omitempty"`
5050
Wait int64 `yaml:"wait,omitempty"`
5151
}
5252

53-
// SelectFrame represents informations needed to select the frame
53+
// SelectFrame represents information needed to select the frame
5454
type SelectFrame struct {
5555
Find string `yaml:"find,omitempty"`
5656
}

process_testcase.go

+12-12
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func (v *Venom) runTestSteps(ctx context.Context, tc *TestCase, tsIn *TestStepRe
352352
allVars.AddAll(tc.computedVars.Clone())
353353
tsResult.ComputedVars = tc.computedVars.Clone()
354354

355-
assign, _, err := processVariableAssigments(ctx, tc.Name, allVars, rawStep)
355+
assign, _, err := processVariableAssignments(ctx, tc.Name, allVars, rawStep)
356356
if err != nil {
357357
tsResult.appendError(err)
358358
Error(ctx, "unable to process variable assignments: %v", err)
@@ -544,11 +544,11 @@ func parseRanged(ctx context.Context, rawStep []byte, stepVars H) (Range, error)
544544
return ranged, nil
545545
}
546546

547-
func processVariableAssigments(ctx context.Context, tcName string, tcVars H, rawStep json.RawMessage) (H, bool, error) {
547+
func processVariableAssignments(ctx context.Context, tcName string, tcVars H, rawStep json.RawMessage) (H, bool, error) {
548548
var stepAssignment AssignStep
549549
var result = make(H)
550550
if err := yaml.Unmarshal(rawStep, &stepAssignment); err != nil {
551-
Error(ctx, "unable to parse assignements (%s): %v", string(rawStep), err)
551+
Error(ctx, "unable to parse assignments (%s): %v", string(rawStep), err)
552552
return nil, false, err
553553
}
554554

@@ -561,27 +561,27 @@ func processVariableAssigments(ctx context.Context, tcName string, tcVars H, raw
561561
tcVarsKeys = append(tcVarsKeys, k)
562562
}
563563

564-
for varname, assigment := range stepAssignment.Assignments {
564+
for varname, assignment := range stepAssignment.Assignments {
565565
Debug(ctx, "Processing %s assignment", varname)
566-
varValue, has := tcVars[assigment.From]
566+
varValue, has := tcVars[assignment.From]
567567
if !has {
568-
varValue, has = tcVars[tcName+"."+assigment.From]
568+
varValue, has = tcVars[tcName+"."+assignment.From]
569569
if !has {
570-
if assigment.Default == nil {
571-
err := fmt.Errorf("%s reference not found in %s", assigment.From, strings.Join(tcVarsKeys, "\n"))
570+
if assignment.Default == nil {
571+
err := fmt.Errorf("%s reference not found in %s", assignment.From, strings.Join(tcVarsKeys, "\n"))
572572
Info(ctx, "%v", err)
573573
return nil, true, err
574574
}
575-
varValue = assigment.Default
575+
varValue = assignment.Default
576576
}
577577
}
578-
if assigment.Regex == "" {
578+
if assignment.Regex == "" {
579579
Info(ctx, "Assign '%s' value '%s'", varname, varValue)
580580
result.Add(varname, varValue)
581581
} else {
582-
regex, err := regexp.Compile(assigment.Regex)
582+
regex, err := regexp.Compile(assignment.Regex)
583583
if err != nil {
584-
Warn(ctx, "unable to compile regexp %q", assigment.Regex)
584+
Warn(ctx, "unable to compile regexp %q", assignment.Regex)
585585
return nil, true, err
586586
}
587587
varValueS, ok := varValue.(string)

process_testcase_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"gopkg.in/yaml.v2"
1010
)
1111

12-
func TestProcessVariableAssigments(t *testing.T) {
12+
func TestProcessVariableAssignments(t *testing.T) {
1313
InitTestLogger(t)
1414
assign := AssignStep{}
1515
assign.Assignments = make(map[string]Assignment)
@@ -26,7 +26,7 @@ func TestProcessVariableAssigments(t *testing.T) {
2626

2727
tcVars := H{"here.some.value": "this is the \nvalue"}
2828

29-
result, is, err := processVariableAssigments(context.TODO(), "", tcVars, b)
29+
result, is, err := processVariableAssignments(context.TODO(), "", tcVars, b)
3030
assert.True(t, is)
3131
assert.NoError(t, err)
3232
assert.NotNil(t, result)
@@ -38,7 +38,7 @@ func TestProcessVariableAssigments(t *testing.T) {
3838
script: echo 'foo'
3939
`)
4040
assert.NoError(t, yaml.Unmarshal(b, &wrongStepIn))
41-
result, is, err = processVariableAssigments(context.TODO(), "", tcVars, b)
41+
result, is, err = processVariableAssignments(context.TODO(), "", tcVars, b)
4242
assert.False(t, is)
4343
assert.NoError(t, err)
4444
assert.Nil(t, result)

process_testsuite.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func (v *Venom) runTestSuite(ctx context.Context, ts *TestSuite) {
3232
}
3333
}
3434

35-
// Intialiaze the testsuite varibles and compute a first interpolation over them
35+
// Intialiaze the testsuite variables and compute a first interpolation over them
3636
ts.Vars.AddAll(v.variables.Clone())
3737
vars, _ := DumpStringPreserveCase(ts.Vars)
3838
for k, v := range vars {

tests/grpc/mock.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const mockServer = createMockServer({
55
serviceName: "Greeter",
66
rules: [
77
{ method: "hello", input: { message: "Hello" }, output: { message: "Hello" } },
8-
{ method: "hello", input: { message: "Hi" }, output: { message: "A little familar, are't you" } },
8+
{ method: "hello", input: { message: "Hi" }, output: { message: "A little familiar, are't you" } },
99
{ method: "goodbye", input: ".*", output: { message: "Goodbye" } },
1010

1111
{

tests/rabbitMQ.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ testcases:
2424
- value: '{"a": "b"}'
2525
contentType: application/json
2626
contentEncoding: utf8
27-
persistant: false
27+
persistent: false
2828
headers:
2929
myCustomHeader: value
3030
myCustomHeader2: value2

0 commit comments

Comments
 (0)