Skip to content

Commit e543df5

Browse files
authored
fix: responses contain label typo (#118)
* fix: typo * chore: update helm chart version * fix: blank lines * fix: added one blank line
1 parent 1ef8d09 commit e543df5

File tree

9 files changed

+156
-151
lines changed

9 files changed

+156
-151
lines changed

charts/steadybit-extension-http/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
apiVersion: v2
22
name: steadybit-extension-http
33
description: Steadybit action implementation to check HTTP endpoints.
4-
version: 1.1.24
5-
appVersion: v1.0.28
4+
version: 1.1.25
5+
appVersion: v1.0.29
66
home: https://www.steadybit.com/
77
icon: https://steadybit-website-assets.s3.amazonaws.com/logo-symbol-transparent.png
88
maintainers:

charts/steadybit-extension-http/values.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,3 @@ extraVolumes: []
141141

142142
# extraVolumeMounts -- Additional volumeMounts to which the container will be mounted.
143143
extraVolumeMounts: []
144-

exthttpcheck/check.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,14 @@ package exthttpcheck
66

77
import (
88
"fmt"
9+
"net/url"
10+
"sync"
11+
"time"
12+
913
"github.com/google/uuid"
1014
"github.com/rs/zerolog/log"
1115
"github.com/steadybit/action-kit/go/action_kit_api/v2"
1216
"github.com/steadybit/extension-kit/extutil"
13-
"net/url"
14-
"sync"
15-
"time"
1617
)
1718

1819
var (
@@ -51,7 +52,7 @@ func prepare(request action_kit_api.PrepareActionRequestBody, state *HTTPCheckSt
5152
}, nil
5253
}
5354
state.ExpectedStatusCodes = expectedStatusCodes
54-
state.ResponsesContains = extutil.ToString(request.Config["responsesContains"])
55+
state.ResponsesContains = extutil.ToString(request.Config["responsesContain"])
5556
state.SuccessRate = extutil.ToInt(request.Config["successRate"])
5657
state.ResponseTimeMode = extutil.ToString(request.Config["responseTimeMode"])
5758
state.ResponseTime = extutil.Ptr(time.Duration(extutil.ToInt64(request.Config["responseTime"])) * time.Millisecond)

exthttpcheck/check_test.go

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
package exthttpcheck
66

77
import (
8+
"net/url"
9+
"sync/atomic"
10+
"testing"
11+
"time"
12+
813
"github.com/google/uuid"
914
"github.com/steadybit/action-kit/go/action_kit_api/v2"
1015
extension_kit "github.com/steadybit/extension-kit"
1116
"github.com/steadybit/extension-kit/extutil"
1217
"github.com/stretchr/testify/assert"
13-
"net/url"
14-
"sync/atomic"
15-
"testing"
16-
"time"
1718
)
1819

1920
func TestAction_Prepare(t *testing.T) {
@@ -30,19 +31,19 @@ func TestAction_Prepare(t *testing.T) {
3031
name: "Should return config",
3132
requestBody: extutil.JsonMangle(action_kit_api.PrepareActionRequestBody{
3233
Config: map[string]interface{}{
33-
"action": "prepare",
34-
"duration": 5000,
35-
"statusCode": "200-209",
36-
"responsesContains": "test",
37-
"successRate": 100,
38-
"maxConcurrent": 10,
39-
"numberOfRequests": 5,
40-
"readTimeout": 5000,
41-
"body": "test",
42-
"url": "https://steadybit.com",
43-
"method": "GET",
44-
"connectTimeout": 5000,
45-
"followRedirects": true,
34+
"action": "prepare",
35+
"duration": 5000,
36+
"statusCode": "200-209",
37+
"responsesContain": "test",
38+
"successRate": 100,
39+
"maxConcurrent": 10,
40+
"numberOfRequests": 5,
41+
"readTimeout": 5000,
42+
"body": "test",
43+
"url": "https://steadybit.com",
44+
"method": "GET",
45+
"connectTimeout": 5000,
46+
"followRedirects": true,
4647
"headers": []any{
4748
map[string]any{"key": "test", "value": "test"},
4849
},
@@ -83,17 +84,17 @@ func TestAction_Prepare(t *testing.T) {
8384
name: "Should return error for missing url",
8485
requestBody: extutil.JsonMangle(action_kit_api.PrepareActionRequestBody{
8586
Config: map[string]interface{}{
86-
"action": "prepare",
87-
"statusCode": "200-209",
88-
"responsesContains": "test",
89-
"successRate": 100,
90-
"maxConcurrent": 10,
91-
"numberOfRequests": 5,
92-
"readTimeout": 5000,
93-
"body": "test",
94-
"method": "GET",
95-
"connectTimeout": 5000,
96-
"followRedirects": true,
87+
"action": "prepare",
88+
"statusCode": "200-209",
89+
"responsesContain": "test",
90+
"successRate": 100,
91+
"maxConcurrent": 10,
92+
"numberOfRequests": 5,
93+
"readTimeout": 5000,
94+
"body": "test",
95+
"method": "GET",
96+
"connectTimeout": 5000,
97+
"followRedirects": true,
9798
"headers": []any{
9899
map[string]any{"key": "test", "value": "test"},
99100
},

exthttpcheck/common.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ var (
133133
Required: extutil.Ptr(true),
134134
Order: extutil.Ptr(12),
135135
}
136-
responsesContains = action_kit_api.ActionParameter{
137-
Name: "responsesContains",
138-
Label: "Responses contains",
136+
responsesContain = action_kit_api.ActionParameter{
137+
Name: "responsesContain",
138+
Label: "Responses contain",
139139
Description: extutil.Ptr("The responses must contain the given string, otherwise the step will fail."),
140140
Type: action_kit_api.ActionParameterTypeString,
141141
Required: extutil.Ptr(false),

exthttpcheck/fixAmount.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package exthttpcheck
77
import (
88
"context"
99
"errors"
10+
1011
"github.com/google/uuid"
1112
"github.com/rs/zerolog/log"
1213
"github.com/steadybit/action-kit/go/action_kit_api/v2"
@@ -112,7 +113,7 @@ func (l *httpCheckActionFixedAmount) Describe() action_kit_api.ActionDescription
112113
resultVerification,
113114
successRate,
114115
statusCode,
115-
responsesContains,
116+
responsesContain,
116117
responseTimeMode,
117118
responseTime,
118119
separator(16),

0 commit comments

Comments
 (0)