File tree 2 files changed +22
-6
lines changed
2 files changed +22
-6
lines changed Original file line number Diff line number Diff line change @@ -74,10 +74,18 @@ func (c lsCustomizer) Customize(req *testcontainers.GenericContainerRequest) err
74
74
}
75
75
76
76
func (c lsCustomizer ) resolveDir (workingDir string ) string {
77
- // trim everything after /pgx-outbox
78
- parts := strings .Split (workingDir , projectName )
77
+ token := projectName + "/" + projectName
78
+
79
+ parts := strings .Split (workingDir , token )
79
80
if len (parts ) > 1 {
80
- workingDir = parts [0 ] + projectName
81
+ // GitHub Actions case, i.e. /home/runner/work/pgx-outbox/pgx-outbox/writer_reader_test.go
82
+ workingDir = parts [0 ] + token
83
+ } else {
84
+ // local machine case
85
+ parts = strings .Split (workingDir , projectName )
86
+ if len (parts ) > 1 {
87
+ workingDir = parts [0 ] + projectName
88
+ }
81
89
}
82
90
83
91
return fmt .Sprintf ("%s/internal/containers/" , workingDir )
Original file line number Diff line number Diff line change @@ -59,10 +59,18 @@ func (c pgCustomizer) Customize(req *testcontainers.GenericContainerRequest) err
59
59
}
60
60
61
61
func (c pgCustomizer ) resolveDir (workingDir string ) string {
62
- // trim everything after /pgx-outbox
63
- parts := strings .Split (workingDir , projectName )
62
+ token := projectName + "/" + projectName
63
+
64
+ parts := strings .Split (workingDir , token )
64
65
if len (parts ) > 1 {
65
- workingDir = parts [0 ] + projectName
66
+ // GitHub Actions case, i.e. /home/runner/work/pgx-outbox/pgx-outbox/writer_reader_test.go
67
+ workingDir = parts [0 ] + token
68
+ } else {
69
+ // local machine case
70
+ parts = strings .Split (workingDir , projectName )
71
+ if len (parts ) > 1 {
72
+ workingDir = parts [0 ] + projectName
73
+ }
66
74
}
67
75
68
76
return fmt .Sprintf ("%s/internal/sql/" , workingDir )
You can’t perform that action at this time.
0 commit comments