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
10 changes: 5 additions & 5 deletions cmd/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command

keycloakURL, err := mc.GetKeycloakURL()
if err != nil {
fmt.Printf("Got error when invoking Microcks client retrieving config: %s", err)
fmt.Printf("Got error when invoking Microcks client retrieving config: %s\n", err)
os.Exit(1)
}

Expand All @@ -78,10 +78,10 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command

oauthToken, err = kc.ConnectAndGetToken()
if err != nil {
fmt.Printf("Got error when invoking Keycloak client: %s", err)
fmt.Printf("Got error when invoking Keycloak client: %s\n", err)
os.Exit(1)
}
//fmt.Printf("Retrieve OAuthToken: %s", oauthToken)
//fmt.Printf("Retrieve OAuthToken: %s\n", oauthToken)
}

// Set Auth token.
Expand Down Expand Up @@ -110,7 +110,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command

mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
fmt.Printf("error %v\n", err)
return
}
}
Expand All @@ -134,7 +134,7 @@ func NewImportCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command
// Try uploading this artifact.
msg, err := mc.UploadArtifact(f, mainArtifact)
if err != nil {
fmt.Printf("Got error when invoking Microcks client importing Artifact: %s", err)
fmt.Printf("Got error when invoking Microcks client importing Artifact: %s\n", err)
os.Exit(1)
}
action := "discovered"
Expand Down
2 changes: 1 addition & 1 deletion cmd/importDir.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func NewImportDirCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
// Create client
mc, err := connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
fmt.Printf("error %v\n", err)
return
}

Expand Down
10 changes: 5 additions & 5 deletions cmd/importURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm

keycloakURL, err := mc.GetKeycloakURL()
if err != nil {
fmt.Printf("Got error when invoking Microcks client retrieving config: %s", err)
fmt.Printf("Got error when invoking Microcks client retrieving config: %s\n", err)
os.Exit(1)
}

Expand All @@ -64,10 +64,10 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm

oauthToken, err = kc.ConnectAndGetToken()
if err != nil {
fmt.Printf("Got error when invoking Keycloak client: %s", err)
fmt.Printf("Got error when invoking Keycloak client: %s\n", err)
os.Exit(1)
}
//fmt.Printf("Retrieve OAuthToken: %s", oauthToken)
//fmt.Printf("Retrieve OAuthToken: %s\n", oauthToken)
}

//Set Auth token
Expand All @@ -91,7 +91,7 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm

mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
fmt.Printf("error %v\n", err)
return
}
}
Expand Down Expand Up @@ -120,7 +120,7 @@ func NewImportURLCommand(globalClientOpts *connectors.ClientOptions) *cobra.Comm
// Try downloading the artifcat
msg, err := mc.DownloadArtifact(f, mainArtifact, secret)
if err != nil {
fmt.Printf("Got error when invoking Microcks client importing Artifact: %s", err)
fmt.Printf("Got error when invoking Microcks client importing Artifact: %s\n", err)
os.Exit(1)
}
fmt.Printf("Microcks has discovered '%s'\n", msg)
Expand Down
4 changes: 2 additions & 2 deletions cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ microcks start --name [name of you container/instance]`,
}

if instance.Status == "Running" {
fmt.Printf("Microcks instance with name %s is already running", name)
fmt.Printf("Microcks instance with name %s is already running\n", name)
return
}

switch instance.Status {
case "Running":
fmt.Printf("Microcks instance with name %s is already running", name)
fmt.Printf("Microcks instance with name %s is already running\n", name)
return
case "Exited":
containerClient, err := connectors.NewContainerClient(instance.Driver)
Expand Down
14 changes: 7 additions & 7 deletions cmd/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {

keycloakURL, err := mc.GetKeycloakURL()
if err != nil {
fmt.Printf("Got error when invoking Microcks client retrieving config: %s", err)
fmt.Printf("Got error when invoking Microcks client retrieving config: %s\n", err)
os.Exit(1)
}

Expand All @@ -132,10 +132,10 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {

oauthToken, err = kc.ConnectAndGetToken()
if err != nil {
fmt.Printf("Got error when invoking Keycloak client: %s", err)
fmt.Printf("Got error when invoking Keycloak client: %s\n", err)
os.Exit(1)
}
//fmt.Printf("Retrieve OAuthToken: %s", oauthToken)
//fmt.Printf("Retrieve OAuthToken: %s\n", oauthToken)
}

// Then - launch the test on Microcks Server.
Expand All @@ -159,7 +159,7 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {

mc, err = connectors.NewClient(*globalClientOpts)
if err != nil {
fmt.Printf("error %v", err)
fmt.Printf("error %v\n", err)
return
}

Expand All @@ -172,10 +172,10 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {
var testResultID string
testResultID, err := mc.CreateTestResult(serviceRef, testEndpoint, runnerType, secretName, waitForMilliseconds, filteredOperations, operationsHeaders, oAuth2Context)
if err != nil {
fmt.Printf("Got error when invoking Microcks client creating Test: %s", err)
fmt.Printf("Got error when invoking Microcks client creating Test: %s\n", err)
os.Exit(1)
}
//fmt.Printf("Retrieve TestResult ID: %s", testResultID)
//fmt.Printf("Retrieve TestResult ID: %s\n", testResultID)

// Finally - wait before checking and loop for some time
time.Sleep(1 * time.Second)
Expand All @@ -188,7 +188,7 @@ func NewTestCommand(globalClientOpts *connectors.ClientOptions) *cobra.Command {
for nowInMilliseconds() < future {
testResultSummary, err := mc.GetTestResult(testResultID)
if err != nil {
fmt.Printf("Got error when invoking Microcks client check TestResult: %s", err)
fmt.Printf("Got error when invoking Microcks client check TestResult: %s\n", err)
os.Exit(1)
}
success = testResultSummary.Success
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func DumpRequestIfRequired(name string, req *http.Request, body bool) {
if err != nil {
fmt.Println("Got error while dumping request out")
}
fmt.Printf("%s", dump)
fmt.Printf("%s\n", dump)
}
}

Expand All @@ -88,7 +88,7 @@ func DumpResponseIfRequired(name string, resp *http.Response, body bool) {
if err != nil {
fmt.Println("Got error while dumping response")
}
fmt.Printf("%s", dump)
fmt.Printf("%s\n", dump)
if body {
fmt.Println("")
}
Expand Down
Loading