Skip to content

Commit

Permalink
Bump Azure tests to go 1.13 (#439)
Browse files Browse the repository at this point in the history
* Bump Azure tests to go 1.13

Also drop Azure tests for go 1.10.

* Fix tests
  • Loading branch information
stanislas-m authored Sep 19, 2019
1 parent aa19b35 commit 99e77bf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
31 changes: 16 additions & 15 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
strategy:
matrix:
# SQLite3
go 1.12 (off) sqlite:
go_version: "1.12"
go 1.13 (off) sqlite:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "sqlite"
steps:
Expand All @@ -23,8 +23,8 @@ jobs:
strategy:
matrix:
# SQLite3
go 1.12 (off) sqlite:
go_version: "1.12"
go 1.13 (off) sqlite:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "sqlite"
steps:
Expand All @@ -36,9 +36,6 @@ jobs:
strategy:
matrix:
# Postgres
go 1.10 postgres:
go_version: "1.10"
SODA_DIALECT: "postgres"
go 1.11 (off) postgres:
go_version: "1.11.5"
GO111MODULE: "off"
Expand All @@ -47,25 +44,29 @@ jobs:
go_version: "1.12"
GO111MODULE: "off"
SODA_DIALECT: "postgres"
go 1.13 (off) postgres:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "postgres"
# Cockroach
go 1.12 (off) cockroach:
go_version: "1.12"
go 1.13 (off) cockroach:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "cockroach"
# Cockroach SSL
go 1.12 (off) cockroach SSL:
go_version: "1.12"
go 1.13 (off) cockroach SSL:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "cockroach_ssl"
# MySQL
go 1.12 (off) mysql:
go_version: "1.12"
go 1.13 (off) mysql:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "mysql"
MYSQL_PORT: "3307"
# SQLite3
go 1.12 (off) sqlite:
go_version: "1.12"
go 1.13 (off) sqlite:
go_version: "1.13"
GO111MODULE: "off"
SODA_DIALECT: "sqlite"
steps:
Expand Down
8 changes: 4 additions & 4 deletions connection_details_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func Test_ConnectionDetails_Finalize(t *testing.T) {
r := require.New(t)

cd := &ConnectionDetails{
URL: "postgres://user:pass@host:port/database",
URL: "postgres://user:pass@host:1337/database",
}
err := cd.Finalize()
r.NoError(err)
Expand All @@ -19,7 +19,7 @@ func Test_ConnectionDetails_Finalize(t *testing.T) {
r.Equal("postgres", cd.Dialect)
r.Equal("host", cd.Host)
r.Equal("pass", cd.Password)
r.Equal("port", cd.Port)
r.Equal("1337", cd.Port)
r.Equal("user", cd.User)
}

Expand All @@ -46,14 +46,14 @@ func Test_ConnectionDetails_Finalize_Cockroach(t *testing.T) {
r := require.New(t)
cd := &ConnectionDetails{
Dialect: "cockroach",
URL: "postgres://user:pass@host:port/database?sslmode=require&sslrootcert=certs/ca.crt&sslkey=certs/client.key&sslcert=certs/client.crt",
URL: "postgres://user:pass@host:1337/database?sslmode=require&sslrootcert=certs/ca.crt&sslkey=certs/client.key&sslcert=certs/client.crt",
}
err := cd.Finalize()
r.NoError(err)
r.Equal("cockroach", cd.Dialect)
r.Equal("database", cd.Database)
r.Equal("host", cd.Host)
r.Equal("port", cd.Port)
r.Equal("1337", cd.Port)
r.Equal("user", cd.User)
r.Equal("pass", cd.Password)
}
Expand Down
6 changes: 3 additions & 3 deletions dialect_cockroach_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ func Test_Cockroach_URL_Raw(t *testing.T) {
r := require.New(t)
cd := &ConnectionDetails{
Dialect: "cockroach",
URL: "scheme://user:pass@host:port/database?option1=value1",
URL: "scheme://user:pass@host:1337/database?option1=value1",
}
err := cd.Finalize()
r.NoError(err)
m := &cockroach{commonDialect: commonDialect{ConnectionDetails: cd}}
r.Equal("scheme://user:pass@host:port/database?option1=value1", m.URL())
r.Equal("postgres://user:pass@host:port/?option1=value1", m.urlWithoutDb())
r.Equal("scheme://user:pass@host:1337/database?option1=value1", m.URL())
r.Equal("postgres://user:pass@host:1337/?option1=value1", m.urlWithoutDb())
}

func Test_Cockroach_URL_Build(t *testing.T) {
Expand Down

0 comments on commit 99e77bf

Please sign in to comment.