Skip to content

Commit b5f5165

Browse files
committed
*: check in changes incurred by make dockertest
1 parent 3365b75 commit b5f5165

File tree

6 files changed

+60
-23
lines changed

6 files changed

+60
-23
lines changed
1.39 KB
Binary file not shown.
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Tue Jan 31 17:56:55 EST 2017
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
43
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip

java/hibernate/gradlew

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS=""
3333
# Use the maximum available, or set MAX_FD != -1 to use that value.
3434
MAX_FD="maximum"
3535

36-
warn ( ) {
36+
warn () {
3737
echo "$*"
3838
}
3939

40-
die ( ) {
40+
die () {
4141
echo
4242
echo "$*"
4343
echo
@@ -155,7 +155,7 @@ if $cygwin ; then
155155
fi
156156

157157
# Escape application args
158-
save ( ) {
158+
save () {
159159
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160160
echo " "
161161
}

ruby/activerecord/db/schema.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,29 @@
1010
#
1111
# It's strongly recommended that you check this file into your version control system.
1212

13-
ActiveRecord::Schema.define(version: 20170207160810) do
13+
ActiveRecord::Schema.define(version: 2017_02_07_160810) do
1414

15-
create_table "customers", id: :bigint, default: -> { "unique_rowid()" }, force: :cascade do |t|
16-
t.text "name", null: false
15+
create_table "customers", force: :cascade do |t|
16+
t.string "name", null: false
1717
end
1818

1919
create_table "order_products", id: false, force: :cascade do |t|
2020
t.bigint "order_id", null: false
2121
t.bigint "product_id", null: false
22+
t.bigserial "rowid", null: false
2223
t.index ["order_id"], name: "index_order_products_on_order_id"
2324
t.index ["product_id"], name: "index_order_products_on_product_id"
2425
end
2526

26-
create_table "orders", id: :bigint, default: -> { "unique_rowid()" }, force: :cascade do |t|
27-
t.decimal "subtotal", null: false
27+
create_table "orders", force: :cascade do |t|
28+
t.decimal "subtotal", precision: 18, scale: 2, default: "0.0", null: false
2829
t.bigint "customer_id", null: false
2930
t.index ["customer_id"], name: "index_orders_on_customer_id"
3031
end
3132

32-
create_table "products", id: :bigint, default: -> { "unique_rowid()" }, force: :cascade do |t|
33-
t.text "name", null: false
34-
t.decimal "price", null: false
33+
create_table "products", force: :cascade do |t|
34+
t.string "name", null: false
35+
t.decimal "price", precision: 18, scale: 2, null: false
3536
end
3637

3738
add_foreign_key "order_products", "orders"

ruby/ar4/db/schema.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
ActiveRecord::Schema.define(version: 20170207160810) do
1515

1616
create_table "customers", id: :bigserial, force: :cascade do |t|
17-
t.text "name", null: false
17+
t.string "name", null: false
1818
end
1919

2020
# Could not dump table "order_products" because of following ArgumentError
@@ -24,8 +24,8 @@
2424
# struct size differs
2525

2626
create_table "products", id: :bigserial, force: :cascade do |t|
27-
t.text "name", null: false
28-
t.decimal "price", null: false
27+
t.string "name", null: false
28+
t.decimal "price", precision: 18, scale: 2, null: false
2929
end
3030

3131
add_foreign_key "order_products", "orders"

testing/main_test.go

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,15 @@ type tenantServer interface {
4747
}
4848

4949
// newServer creates a new cockroachDB server.
50-
func newServer(t *testing.T) testserver.TestServer {
50+
func newServer(t *testing.T, insecure bool) testserver.TestServer {
5151
t.Helper()
52-
ts, err := testserver.NewTestServer()
52+
var ts testserver.TestServer
53+
var err error
54+
if insecure {
55+
ts, err = testserver.NewTestServer()
56+
} else {
57+
ts, err = testserver.NewTestServer(testserver.SecureOpt())
58+
}
5359
if err != nil {
5460
t.Fatal(err)
5561
}
@@ -196,6 +202,10 @@ type testInfo struct {
196202
language, orm string
197203
tableNames testTableNames // defaults to defaultTestTableNames
198204
columnNames testColumnNames // defaults to defaultTestColumnNames
205+
// insecure is set if ORM does not handle secure servers (client certs).
206+
// In that case, we start an insecure server (and don't test in tenant
207+
// mode).
208+
insecure bool
199209
}
200210

201211
func testORM(t *testing.T, info testInfo) {
@@ -217,7 +227,7 @@ func testORM(t *testing.T, info testInfo) {
217227
}
218228
var testCases []testCase
219229
{
220-
ts := newServer(t)
230+
ts := newServer(t, info.insecure)
221231
db, dbURL, stopDB := startServerWithApplication(t, ts, app)
222232
defer stopDB()
223233

@@ -345,19 +355,43 @@ func TestGORM(t *testing.T) {
345355
}
346356

347357
func TestGOPG(t *testing.T) {
348-
testORM(t, testInfo{language: "go", orm: "gopg"})
358+
testORM(t, testInfo{
359+
language: "go",
360+
orm: "gopg",
361+
// GoPG does not support client certs:
362+
// https://github.com/go-pg/pg/blob/v10/options.go
363+
// If we set up a secure deployment and went through the proxy, it would work (or should anyway), but only
364+
// via the 'database' parameter; GoPG also does not support the 'options' parameter.
365+
insecure: true,
366+
})
349367
}
350368

351369
func TestHibernate(t *testing.T) {
352-
testORM(t, testInfo{language: "java", orm: "hibernate"})
370+
testORM(t, testInfo{
371+
language: "java",
372+
orm: "hibernate",
373+
// Possibly does not unescape the path correctly:
374+
// Caused by: java.io.FileNotFoundException:
375+
// %2Ftmp%2Fcockroach-testserver913095208%2Fcerts%2Fca.crt (No such file or directory)
376+
insecure: true,
377+
})
353378
}
354379

355380
func TestSequelize(t *testing.T) {
356-
testORM(t, testInfo{language: "node", orm: "sequelize"})
381+
testORM(t, testInfo{
382+
language: "node",
383+
orm: "sequelize",
384+
// Requires bespoke code to actually use SSL, see:
385+
// https://github.com/sequelize/sequelize/issues/10015
386+
insecure: true,
387+
})
357388
}
358389

359390
func TestSQLAlchemy(t *testing.T) {
360-
testORM(t, testInfo{language: "python", orm: "sqlalchemy"})
391+
testORM(t, testInfo{
392+
language: "python",
393+
orm: "sqlalchemy",
394+
})
361395
}
362396

363397
func TestDjango(t *testing.T) {
@@ -366,6 +400,9 @@ func TestDjango(t *testing.T) {
366400
orm: "django",
367401
tableNames: djangoTestTableNames,
368402
columnNames: djangoTestColumnNames,
403+
// No support for client certs (at least not via the query string).
404+
// psycopg2.OperationalError: fe_sendauth: no password supplied
405+
insecure: true,
369406
})
370407
}
371408

0 commit comments

Comments
 (0)