Skip to content
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

regression tests for fixes in release/0.84.1 #308

Merged
merged 4 commits into from
Feb 4, 2019
Merged

regression tests for fixes in release/0.84.1 #308

merged 4 commits into from
Feb 4, 2019

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Jan 31, 2019

added regression tests for our fix in release/0.84.1 and some refactoring that was needed for it:

  • check prepared statements in wholecell mode too
  • use separate docker images (tests/docker/*.dockerfile) for databases with injected tls keys (tests/ssl/*) to correct use tls connections with all db drivers in integrations tests
  • added mariadb to tests and use images with strict settings that forces tls and deny raw connections
  • remove var TestOnly = "false" variable in acra-server that was changed on compile time only for tests

.circleci/integration.sh Show resolved Hide resolved
tlsConfig.ClientAuth = tls.NoClientCert
log.Warningln("Skip verifying TLS certificate, use for tests only!")
}
log.Infoln("Loaded tls config")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
log.Infoln("Loaded tls config")
log.Infoln("Loaded TLS config")

😁

@@ -342,7 +342,8 @@ func (handler *Handler) ProxyClientConnection(errCh chan<- error) {
handler.setQueryHandler(handler.QueryResponseHandler)
break
case CommandStatementClose, CommandStatementSendLongData, CommandStatementReset:
fallthrough
clientLog.Debugln("Close|SendLongData|Reset command")
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

why break?

decryptor/postgresql/dataProcessor.go Show resolved Hide resolved
tests/ssl/README.md Outdated Show resolved Hide resolved
tests/ssl/generate_tls_keys.sh Show resolved Hide resolved
tests/test.py Show resolved Hide resolved
@vixentael
Copy link
Collaborator

great, so many tests now!

@@ -342,7 +342,8 @@ func (handler *Handler) ProxyClientConnection(errCh chan<- error) {
handler.setQueryHandler(handler.QueryResponseHandler)
break
case CommandStatementClose, CommandStatementSendLongData, CommandStatementReset:
fallthrough
clientLog.Debugln("Close|SendLongData|Reset command")
break
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
break

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yeah, golang doesn't require break

Copy link
Collaborator

Choose a reason for hiding this comment

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

really?
my main concern was about the reason of changing logic – from "fallthrough" to "break"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

with fallthrough it will log that `unknown command with code XX. now it log specific names of commands as it was expected )

Co-Authored-By: Lagovas <[email protected]>
@Lagovas Lagovas merged commit 532ae8a into cossacklabs:master Feb 4, 2019
@Lagovas Lagovas deleted the lagovas/hotfix-tests branch February 20, 2019 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants