Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yisaer <[email protected]>
  • Loading branch information
Yisaer committed Jan 10, 2024
1 parent 44ee17b commit eed3990
Showing 1 changed file with 72 additions and 57 deletions.
129 changes: 72 additions & 57 deletions internal/io/http/httppull_source_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (

"github.com/lf-edge/ekuiper/internal/conf"
"github.com/lf-edge/ekuiper/internal/io/mock"
"github.com/lf-edge/ekuiper/internal/pkg/cert"
"github.com/lf-edge/ekuiper/internal/topo/topotest/mockclock"
"github.com/lf-edge/ekuiper/internal/xsql"
"github.com/lf-edge/ekuiper/pkg/api"
Expand Down Expand Up @@ -322,15 +323,17 @@ func TestConfigure(t *testing.T) {
"url": "http://localhost:9090/",
},
config: &RawConf{
Incremental: true,
Url: "http://localhost:9090/",
ResendUrl: "http://localhost:9090/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Incremental: true,
Url: "http://localhost:9090/",
ResendUrl: "http://localhost:9090/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
},
},
// Test wrong properties
Expand Down Expand Up @@ -422,14 +425,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]interface{}{
"Authorization": "Bearer {{.token}}",
},
Expand Down Expand Up @@ -473,14 +478,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]interface{}{
"Authorization": "Bearer {{.token}}",
},
Expand Down Expand Up @@ -531,14 +538,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]interface{}{
"Authorization": "Bearer {{.token}}",
},
Expand Down Expand Up @@ -612,14 +621,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]interface{}{
"Authorization": "Bearer {{.token}}",
},
Expand Down Expand Up @@ -685,14 +696,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "none",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]interface{}{
"Authorization": "Bearer {{.token}}",
},
Expand Down Expand Up @@ -737,14 +750,16 @@ func TestConfigure(t *testing.T) {
},
},
config: &RawConf{
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "json",
ResponseType: "code",
InsecureSkipVerify: true,
Url: "http://localhost:52345/",
ResendUrl: "http://localhost:52345/",
Method: http.MethodGet,
Interval: DefaultInterval,
Timeout: DefaultTimeout,
BodyType: "json",
ResponseType: "code",
TlsConfigurationOptions: &cert.TlsConfigurationOptions{
SkipCertVerify: true,
},
Headers: map[string]string{
"Authorization": "Bearer {{.token}}",
},
Expand Down

0 comments on commit eed3990

Please sign in to comment.