You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 26, 2024. It is now read-only.
Describe the bug
I'm unable to import the protobuf libraries developed by Google which is a basic requirement to develop test that have the the protobuf generated code inside.
To Reproduce
Steps to reproduce the behavior:
Run Replicant v0.2.1
Copy the Go example presented in the Readme
Add the import for the proto libs
Invoke the /api/v1/run
Observe the "error": "driver/go: error initializing transaction script: 9:3: import \"github.com/golang/protobuf/proto\" error: unable to find source related to: \"github.com/golang/protobuf/proto\""
Expected behavior
i expected Replicant to detect and fetch the dependencies so that it could run such tests.
Screenshots
The response
The request payload
name: duckduckgo-api-searchdriver: goschedule: '@every 60s'timeout: 60sretry_count: 2inputs:
url: "https://api.duckduckgo.com"text: "blade runner"metadata:
transaction: api-searchapplication: duckduckgoenvironment: productioncomponent: apiscript: | package transaction // Code generated by protoc-gen-go. DO NOT EDIT. // source: translation.proto import ( context "context" fmt "fmt" proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" math "math" "bytes" "context" "fmt" "net/http" "io/ioutil" "net/http" "regexp" ) //The protobuf generated code is omitted due to business reasons func Run(ctx context.Context) (m string, d string, err error) { req, err := http.NewRequest(http.MethodGet, "{{ index . "url" }}", nil) if err != nil { return "request build failed", "", err } req.Header.Add("Accept-Charset","utf-8") q := req.URL.Query() q.Add("q", "{{ index . "text" }}") q.Add("format", "json") q.Add("pretty", "1") q.Add("no_redirect", "1") req.URL.RawQuery = q.Encode() client := &http.Client{} resp, err := client.Do(req) if err != nil { return "failed to send request", "", err } buf, err := ioutil.ReadAll(resp.Body) if err != nil { return "failed to read response", "", err } rx, err := regexp.Compile(`"Text"\s*:\s*"(.*?)"`) if err != nil { return "failed to compile regexp", "", err } s := rx.FindSubmatch(buf) if len(s) < 2 { return "failed to find data", "", fmt.Errorf("no match") } return "search result", fmt.Sprintf("%s", s[1]), nil }
The text was updated successfully, but these errors were encountered:
Thx 💪 . So for you to have more context, we are planning extending the CLI to allow one to register compiled tests and having Replicant executing those using the plugin package
Describe the bug
I'm unable to import the protobuf libraries developed by Google which is a basic requirement to develop test that have the the protobuf generated code inside.
To Reproduce
Steps to reproduce the behavior:
/api/v1/run
"error": "driver/go: error initializing transaction script: 9:3: import \"github.com/golang/protobuf/proto\" error: unable to find source related to: \"github.com/golang/protobuf/proto\""
Expected behavior
i expected Replicant to detect and fetch the dependencies so that it could run such tests.
Screenshots
![image](https://user-images.githubusercontent.com/6062267/77523662-fc3c5080-6e7d-11ea-9241-c5e124480000.png)
The response
The request payload
The text was updated successfully, but these errors were encountered: