Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ build-binaries:

.PHONY: build-watcher
build-watcher:
go build -o ${DIST_DIR}/${BIN_NAME}-${WATCHER_NAME} ${PACKAGE}/watcher
go build -o ${DIST_DIR}/${BIN_NAME}-${WATCHER_NAME} ${PACKAGE}/watcher

.PHONY: vet
vet:
go vet ./...
6 changes: 3 additions & 3 deletions pkg/connectors/microcks_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ func (c *microcksClient) CreateTestResult(serviceID string, testEndpoint string,
if len(operationsHeaders) > 0 && ensureValidOperationsHeaders(operationsHeaders) {
input += (", \"operationsHeaders\": " + operationsHeaders)
}
if len(oAuth2Context) > 0 && ensureValieOAuth2Context(oAuth2Context) {
if len(oAuth2Context) > 0 && ensureValidOAuth2Context(oAuth2Context) {
input += (", \"oAuth2Context\": " + oAuth2Context)
}

Expand Down Expand Up @@ -521,7 +521,7 @@ func (c *microcksClient) DownloadArtifact(artifactURL string, mainArtifact bool,
// Dump response if verbose required.
config.DumpResponseIfRequired("Microcks for uploading artifact", resp, true)

respBody, err := io.ReadAll(req.Body)
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err.Error())
}
Expand Down Expand Up @@ -556,7 +556,7 @@ func ensureValidOperationsHeaders(operationsHeaders string) bool {
return true
}

func ensureValieOAuth2Context(oAuth2Context string) bool {
func ensureValidOAuth2Context(oAuth2Context string) bool {
var oContext = OAuth2ClientContext{}
err := json.Unmarshal([]byte(oAuth2Context), &oContext)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion pkg/watcher/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ func TriggerImport(entry config.WatchEntry) {
// Retrieve config to get client options.
cfgPath, err := config.DefaultLocalConfigPath()
if err != nil {
fmt.Errorf("Error while loading config: %s", err.Error())
fmt.Printf("Error while loading config: %s\n", err.Error())
}

fmt.Println("[INFO] Re-importing changed file: " + entry.FilePath)
Expand Down