Skip to content

Commit

Permalink
fix(deps): update deps (patch) (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored Apr 28, 2022
1 parent e8907bf commit 35867ec
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 56 deletions.
11 changes: 5 additions & 6 deletions compiler/native/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,17 +513,16 @@ func (c *client) modifyConfig(build *yaml.Build, libraryBuild *library.Build, re
Backoff: retryablehttp.DefaultBackoff,
}

// ensure the overall request(s) do not take over the defined timeout
ctx, cancel := context.WithTimeout(context.Background(), c.ModificationService.Timeout)
defer cancel()

// create POST request
req, err := retryablehttp.NewRequest("POST", c.ModificationService.Endpoint, bytes.NewBuffer(b))
req, err := retryablehttp.NewRequestWithContext(ctx, "POST", c.ModificationService.Endpoint, bytes.NewBuffer(b))
if err != nil {
return nil, err
}

// ensure the overall request(s) do not take over the defined timeout
ctx, cancel := context.WithTimeout(req.Request.Context(), c.ModificationService.Timeout)
defer cancel()
req.WithContext(ctx)

// add content-type and auth headers
req.Header.Add("Content-Type", "application/json")
req.Header.Add("Authorization", fmt.Sprintf("Bearer %s", c.ModificationService.Secret))
Expand Down
2 changes: 1 addition & 1 deletion database/postgres/repo_count_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func TestPostgres_Client_GetOrgRepoCount_NonAdmin(t *testing.T) {
_rows := sqlmock.NewRows([]string{"count"}).AddRow(1)

// ensure the mock expects the query
_mock.ExpectQuery("SELECT count(*) FROM \"repos\" WHERE (org = $1) AND \"visibility\" = $2").WillReturnRows(_rows)
_mock.ExpectQuery("SELECT count(*) FROM \"repos\" WHERE org = $1 AND \"visibility\" = $2").WillReturnRows(_rows)

// setup tests
tests := []struct {
Expand Down
2 changes: 1 addition & 1 deletion database/postgres/repo_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func TestPostgres_Client_GetOrgRepoList_NonAdmin(t *testing.T) {
).AddRow(1, 1, "baz", "foo", "bar", "foo/bar", "", "", "", 0, 0, "public", false, false, false, false, false, false, false, false, "yaml", "")

// ensure the mock expects the query
_mock.ExpectQuery("SELECT * FROM \"repos\" WHERE (org = $1) AND \"visibility\" = $2 ORDER BY name LIMIT 10").WillReturnRows(_rows)
_mock.ExpectQuery("SELECT * FROM \"repos\" WHERE org = $1 AND \"visibility\" = $2 ORDER BY name LIMIT 10").WillReturnRows(_rows)

// setup tests
tests := []struct {
Expand Down
20 changes: 20 additions & 0 deletions database/sqlite/secret_list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func TestSqlite_Client_GetSecretList(t *testing.T) {
_secretOne.SetName("baz")
_secretOne.SetValue("foob")
_secretOne.SetType("repo")
_secretOne.SetCreatedAt(1)
_secretOne.SetUpdatedAt(1)

_secretTwo := testSecret()
_secretTwo.SetID(2)
Expand All @@ -45,6 +47,8 @@ func TestSqlite_Client_GetSecretList(t *testing.T) {
_secretTwo.SetName("foob")
_secretTwo.SetValue("baz")
_secretTwo.SetType("repo")
_secretTwo.SetCreatedAt(1)
_secretTwo.SetUpdatedAt(1)

// setup the test database client
_database, err := NewTest()
Expand Down Expand Up @@ -107,6 +111,8 @@ func TestSqlite_Client_GetTypeSecretList_Org(t *testing.T) {
_secretOne.SetName("baz")
_secretOne.SetValue("bar")
_secretOne.SetType("org")
_secretOne.SetCreatedAt(1)
_secretOne.SetUpdatedAt(1)

_secretTwo := testSecret()
_secretTwo.SetID(2)
Expand All @@ -115,6 +121,8 @@ func TestSqlite_Client_GetTypeSecretList_Org(t *testing.T) {
_secretTwo.SetName("bar")
_secretTwo.SetValue("baz")
_secretTwo.SetType("org")
_secretTwo.SetCreatedAt(1)
_secretTwo.SetUpdatedAt(1)

// setup the test database client
_database, err := NewTest()
Expand Down Expand Up @@ -177,6 +185,8 @@ func TestSqlite_Client_GetTypeSecretList_Repo(t *testing.T) {
_secretOne.SetName("baz")
_secretOne.SetValue("foob")
_secretOne.SetType("repo")
_secretOne.SetCreatedAt(1)
_secretOne.SetUpdatedAt(1)

_secretTwo := testSecret()
_secretTwo.SetID(2)
Expand All @@ -185,6 +195,8 @@ func TestSqlite_Client_GetTypeSecretList_Repo(t *testing.T) {
_secretTwo.SetName("foob")
_secretTwo.SetValue("baz")
_secretTwo.SetType("repo")
_secretTwo.SetCreatedAt(1)
_secretTwo.SetUpdatedAt(1)

// setup the test database client
_database, err := NewTest()
Expand Down Expand Up @@ -247,6 +259,8 @@ func TestSqlite_Client_GetTypeSecretList_Shared(t *testing.T) {
_secretOne.SetName("baz")
_secretOne.SetValue("foob")
_secretOne.SetType("shared")
_secretOne.SetCreatedAt(1)
_secretOne.SetUpdatedAt(1)

_secretTwo := testSecret()
_secretTwo.SetID(2)
Expand All @@ -255,6 +269,8 @@ func TestSqlite_Client_GetTypeSecretList_Shared(t *testing.T) {
_secretTwo.SetName("foob")
_secretTwo.SetValue("baz")
_secretTwo.SetType("shared")
_secretTwo.SetCreatedAt(1)
_secretTwo.SetUpdatedAt(1)

// setup the test database client
_database, err := NewTest()
Expand Down Expand Up @@ -317,6 +333,8 @@ func TestSqlite_Client_GetTypeSecretList_Shared_wildcard(t *testing.T) {
_secretOne.SetName("baz")
_secretOne.SetValue("foob")
_secretOne.SetType("shared")
_secretOne.SetCreatedAt(1)
_secretOne.SetUpdatedAt(1)

_secretTwo := testSecret()
_secretTwo.SetID(2)
Expand All @@ -325,6 +343,8 @@ func TestSqlite_Client_GetTypeSecretList_Shared_wildcard(t *testing.T) {
_secretTwo.SetName("foob")
_secretTwo.SetValue("baz")
_secretTwo.SetType("shared")
_secretTwo.SetCreatedAt(1)
_secretTwo.SetUpdatedAt(1)

// setup the test database client
_database, err := NewTest()
Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,31 +13,31 @@ require (
github.com/drone/envsubst v1.0.3
github.com/gin-gonic/gin v1.7.7
github.com/go-playground/assert/v2 v2.0.1
github.com/go-redis/redis/v8 v8.11.4
github.com/go-redis/redis/v8 v8.11.5
github.com/go-vela/types v0.13.1-0.20220419120049-00bb10826281
github.com/golang-jwt/jwt/v4 v4.4.0
github.com/google/go-cmp v0.5.7
github.com/golang-jwt/jwt/v4 v4.4.1
github.com/google/go-cmp v0.5.8
github.com/google/go-github/v42 v42.0.0
github.com/google/uuid v1.3.0
github.com/goware/urlx v0.3.1
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hashicorp/go-retryablehttp v0.7.0
github.com/hashicorp/go-retryablehttp v0.7.1
github.com/hashicorp/vault/api v1.5.0
github.com/joho/godotenv v1.4.0
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.12.1
github.com/sirupsen/logrus v1.8.1
github.com/spf13/afero v1.8.1
github.com/spf13/afero v1.8.2
github.com/urfave/cli/v2 v2.4.0
go.starlark.net v0.0.0-20220328144851-d1966c6b9fcd
golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/tomb.v2 v2.0.0-20161208151619-d5d1b5820637
gorm.io/driver/postgres v1.3.1
gorm.io/driver/sqlite v1.3.1
gorm.io/gorm v1.23.1
k8s.io/apimachinery v0.23.4
gorm.io/driver/postgres v1.3.5
gorm.io/driver/sqlite v1.3.2
gorm.io/gorm v1.23.5
k8s.io/apimachinery v0.23.6
)

require (
Expand Down Expand Up @@ -85,15 +85,15 @@ require (
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
github.com/jackc/pgconn v1.10.1 // indirect
github.com/jackc/pgconn v1.12.0 // indirect
github.com/jackc/pgio v1.0.0 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgproto3/v2 v2.2.0 // indirect
github.com/jackc/pgproto3/v2 v2.3.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
github.com/jackc/pgtype v1.9.1 // indirect
github.com/jackc/pgx/v4 v4.14.1 // indirect
github.com/jackc/pgtype v1.11.0 // indirect
github.com/jackc/pgx/v4 v4.16.0 // indirect
github.com/jinzhu/inflection v1.0.0 // indirect
github.com/jinzhu/now v1.1.4 // indirect
github.com/jinzhu/now v1.1.5 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.0 // indirect
Expand Down
Loading

0 comments on commit 35867ec

Please sign in to comment.