File tree 14 files changed +298
-239
lines changed 14 files changed +298
-239
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,17 @@ jobs:
148
148
149
149
- run : go install gotest.tools/gotestsum@latest
150
150
151
+ - uses : hashicorp/setup-terraform@v1
152
+ if : runner.os == 'Linux'
153
+ with :
154
+ terraform_version : 1.1.2
155
+ terraform_wrapper : false
156
+
151
157
- name : Test with Mock Database
152
158
run :
153
159
gotestsum --jsonfile="gotests.json" --packages="./..." --
154
160
-covermode=atomic -coverprofile="gotests.coverage" -timeout=3m
155
- -count=3 -race -parallel=2
161
+ -count=3 -race -short - parallel=2
156
162
157
163
- name : Test with PostgreSQL Database
158
164
if : runner.os == 'Linux'
Original file line number Diff line number Diff line change
1
+ // This test runs slowly on MacOS instance, and really
2
+ // only needs to run on Linux anyways.
3
+ //go:build linux
4
+
1
5
package userpassword_test
2
6
3
7
import (
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ func TestMain(m *testing.M) {
20
20
func TestMigrate (t * testing.T ) {
21
21
t .Parallel ()
22
22
23
+ if testing .Short () {
24
+ t .Skip ()
25
+ return
26
+ }
27
+
23
28
t .Run ("Once" , func (t * testing.T ) {
24
29
t .Parallel ()
25
30
connection , closeFn , err := postgres .Open ()
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ func TestMain(m *testing.M) {
21
21
func TestPostgres (t * testing.T ) {
22
22
t .Parallel ()
23
23
24
+ if testing .Short () {
25
+ t .Skip ()
26
+ return
27
+ }
28
+
24
29
connect , close , err := postgres .Open ()
25
30
require .NoError (t , err )
26
31
defer close ()
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ require (
13
13
github.com/golang-migrate/migrate/v4 v4.15.1
14
14
github.com/google/uuid v1.3.0
15
15
github.com/hashicorp/go-version v1.4.0
16
- github.com/hashicorp/hc-install v0.3.1
17
16
github.com/hashicorp/terraform-config-inspect v0.0.0-20211115214459-90acf1ca460f
18
17
github.com/hashicorp/terraform-exec v0.15.0
19
18
github.com/justinas/nosurf v1.1.1
@@ -64,7 +63,6 @@ require (
64
63
github.com/google/go-cmp v0.5.7 // indirect
65
64
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
66
65
github.com/hashicorp/errwrap v1.1.0 // indirect
67
- github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
68
66
github.com/hashicorp/go-multierror v1.1.1 // indirect
69
67
github.com/hashicorp/hcl v1.0.0 // indirect
70
68
github.com/hashicorp/hcl/v2 v2.11.1 // indirect
Original file line number Diff line number Diff line change @@ -693,8 +693,6 @@ github.com/hashicorp/go-version v1.4.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09
693
693
github.com/hashicorp/golang-lru v0.5.0 /go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8 =
694
694
github.com/hashicorp/golang-lru v0.5.1 /go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8 =
695
695
github.com/hashicorp/golang-lru v0.5.4 /go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4 =
696
- github.com/hashicorp/hc-install v0.3.1 h1:VIjllE6KyAI1A244G8kTaHXy+TL5/XYzvrtFi8po/Yk =
697
- github.com/hashicorp/hc-install v0.3.1 /go.mod h1:3LCdWcCDS1gaHC9mhHCGbkYfoY6vdsKohGjugbZdZak =
698
696
github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f /go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w =
699
697
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4 =
700
698
github.com/hashicorp/hcl v1.0.0 /go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ =
@@ -1309,7 +1307,6 @@ golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPh
1309
1307
golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0 /go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto =
1310
1308
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2 /go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4 =
1311
1309
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b /go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4 =
1312
- golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e /go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc =
1313
1310
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 /go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc =
1314
1311
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 /go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc =
1315
1312
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 /go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc =
Original file line number Diff line number Diff line change @@ -141,9 +141,9 @@ func (c *Channel) init() {
141
141
// A DataChannel can disconnect multiple times, so this needs to loop.
142
142
for {
143
143
select {
144
- case <- c .closed :
144
+ case <- c .conn . closedRTC :
145
145
// If this channel was closed, there's no need to close again.
146
- return
146
+ err = c . conn . closeError
147
147
case <- c .conn .Closed ():
148
148
// If the RTC connection closed with an error, this channel
149
149
// should end with the same one.
You can’t perform that action at this time.
0 commit comments