-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: use embedded certs #3310
sql: use embedded certs #3310
Conversation
have you verified that a standalone sqllogictest binary works? |
tmpKeyPath := tempRestrictedCopy(t.T, keyPath, tempDir) | ||
// Copy these assets to disk from embedded strings, so this test can | ||
// run from a standalone binary. | ||
tempCAPath, _ := tempRestrictedCopy(t.T, tempDir, caPath, "TestLogic_ca") |
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.
Rather than passing in the prefix for the temp file, you could derive it from the source path using filepath.Base()
.
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.
That's true, but in this case it's tagged with the test name, so I'd rather leave it as-is.
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 don't see why that matters, but ok, this isn't very important.
LGTM, though we might want something that requires a bit less boilerplate per test since other tests might need this in the future when we move to using pgwire more widely. I'm thinking of the acceptance tests as one example. |
I think this is pretty close to the minimum boilerplate that can be had. We can export |
I disagree about this being the minimum boilerplate. There could be a single function which creates a temporary directory and writes the embedded certs out to it with the appropriate permissions and returns the lib/pq parameters already encoded. |
Oh, sure, if you wanted to reduce the boilerplate all the way out to getting a lib/pq-specific thing. |
@mberhault testing this locally resulted in serious static-binary-related sadness. I'm still trying to get to the bottom of it with a minimal repro, but for now |
Fixes nightly sqllogictest.
OK, So I think the segfault issue now only affects TestPGWire, which we don't run in a static binary, and logic test does pass in the static binary in my local docker container. I'm going to merge this and hope for the best. |
LGTM On Fri, Dec 4, 2015, 08:20 Tamir Duberstein notifications@github.com
|
@tamird FYI, I just noticed that the benchmarks in |
I'm about to get on a plane, but yeah that seems bad. Might be tricky to fix since local postgres will need certs. I'll take a look in the air. |
Fixes nightly sqllogictest.