Skip to content

Adding a possibility to skip SSL certificate verification in Connector Service acceptance tests #1241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Oct 15, 2018

Conversation

lszymik
Copy link

@lszymik lszymik commented Oct 12, 2018

Description

Changes proposed in this pull request:

  • Adding a possibility to skip SSL certificate verification in Connector Service acceptance tests

Related issue(s)
Fixes #1077

@lszymik lszymik added kind/feature Categorizes issue or PR as related to a new feature. area/application-connector Issues or PRs related to application connectivity labels Oct 12, 2018
@lszymik lszymik added this to the Sprint_Framefrog_2 milestone Oct 12, 2018
@Szymongib Szymongib self-assigned this Oct 12, 2018
}

func NewConnectorClient(remoteEnv, internalAPIUrl, externalAPIUrl string) ConnectorClient {
func NewConnectorClient(remoteEnv, internalAPIUrl, externalAPIUrl string, client *http.Client) ConnectorClient {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest passing only boolean and instantiating the client in NewConnectorClient method:

func NewConnectorClient(remoteEnv, internalAPIUrl string, skipVerify bool) ConnectorClient {
	client := NewHttpClient(skipVerify)

	return connectorClient{
		remoteEnv:      remoteEnv,
		internalAPIUrl: internalAPIUrl,
		httpClient:     client,
	}
}

@lszymik lszymik requested a review from a team as a code owner October 12, 2018 12:16
@@ -2,53 +2,36 @@

## Overview

This project contains the acceptance tests for Connector Service.
The tests are written in Go. Run them as standard Go tests.
This project contains the acceptance tests for Kyma Connector Service.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the Kyma Connector Service


## Prerequisites

The Connector Service Acceptance Tests requires Go 1.8 or higher.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The project requires?


The Connector Service Acceptance Tests requires Go 1.8 or higher.

## Build
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

## Installation as in the template.


1. `git clone [email protected]:kyma-project/kyma.git`
2. `cd /tests/connector-service-tests`
3. `CGO_ENABLED=0 go build ./test/apitests/connector_test.go`

## Usage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add an introductory sentence, we try to avoid stacked headings - Read which environment parameters to use and how to run tests.

ok github.com/kyma-project/gateway-tests/test 0.003s
```
### Environment parameters

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are all of them obligatory? Perhaps it would be better to add a table similar to the one here?

Either way, pls add some sort of description above the list, e.g. Use these environment variables to configure the application:

* **GATEWAY_URL** - The URL of Remote Environment Gateway API
* **SKIP_SSL_VERIFY** - A flag for skipping SSL certificate validation

### Running
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

### Run the tests (we try to avoid gerund - ing - forms)

* **INTERNAL_API_URL** - The URL of Connector Service internal API
* **EXTERNAL_API_URL** - The URL of Connector Service external API
* **GATEWAY_URL** - The URL of Remote Environment Gateway API
* **SKIP_SSL_VERIFY** - A flag for skipping SSL certificate validation
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* **INTERNAL_API_URL**  is the URL of the Connector Service internal API. 
* **EXTERNAL_API_URL** is the URL of the Connector Service external API. 
* **GATEWAY_URL** is the URL of the Remote Environment Gateway API.
* **SKIP_SSL_VERIFY** is a flag for skipping the SSL certificate validation.

### Running

1. Provide all required environment parameters
2. Execute tests
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2. Run this command to execute tests:


### Running

1. Provide all required environment parameters
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1. Provide all required environment parameters. - Could you provide an example of what you mean in this step?

* **SKIP_SSL_VERIFY** - A flag for skipping SSL certificate validation

### Running

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls add some sort of introduction: Follow these steps to run acceptance tests: or sth, we should introduce bullet points and steps somehow.

@lszymik lszymik merged commit b2a5fd5 into kyma-project:master Oct 15, 2018
grischperl pushed a commit to grischperl/kyma that referenced this pull request Nov 10, 2020
* Add test

* Review fixes

* Change regexp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/application-connector Issues or PRs related to application connectivity kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants