-
Notifications
You must be signed in to change notification settings - Fork 403
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
Conversation
…lf-signed certificate
…lf-signed certificate
} | ||
|
||
func NewConnectorClient(remoteEnv, internalAPIUrl, externalAPIUrl string) ConnectorClient { | ||
func NewConnectorClient(remoteEnv, internalAPIUrl, externalAPIUrl string, client *http.Client) ConnectorClient { |
There was a problem hiding this comment.
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,
}
}
…lf-signed certificate
…lf-signed certificate
@@ -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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
|
There was a problem hiding this comment.
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.
…lf-signed certificate
* Add test * Review fixes * Change regexp
Description
Changes proposed in this pull request:
Related issue(s)
Fixes #1077