diff options
| author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2023-11-18 12:32:56 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-18 12:32:56 -0500 |
| commit | d7d86de787940f90902f2fc47c8ea598901494ac (patch) | |
| tree | 175241267f78fe9e2672649af551244511d0f8e9 | |
| parent | b0bbd3b988afaab67858033ab15770f45b9f1530 (diff) | |
Build(deps): Bump github.com/aws/aws-sdk-go from 1.44.220 to 1.48.0 (#1913)
* Build(deps): Bump github.com/aws/aws-sdk-go from 1.44.220 to 1.48.0
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.220 to 1.48.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.44.220...v1.48.0)
---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
* Fix unit test to support IMDSv2
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
---------
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
| -rw-r--r-- | go.mod | 2 | ||||
| -rw-r--r-- | go.sum | 4 | ||||
| -rw-r--r-- | internal/tests/integration/datasources_vault_ec2_test.go | 19 | ||||
| -rw-r--r-- | render_test.go | 2 |
4 files changed, 23 insertions, 4 deletions
@@ -7,7 +7,7 @@ require ( github.com/Masterminds/goutils v1.1.1 github.com/Masterminds/semver/v3 v3.2.1 github.com/Shopify/ejson v1.4.1 - github.com/aws/aws-sdk-go v1.44.220 + github.com/aws/aws-sdk-go v1.48.0 github.com/docker/libkv v0.2.2-0.20180912205406-458977154600 github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa github.com/go-git/go-billy/v5 v5.5.0 @@ -563,8 +563,8 @@ github.com/aws/aws-sdk-go v1.43.31/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4 github.com/aws/aws-sdk-go v1.44.156/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.44.187/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= github.com/aws/aws-sdk-go v1.44.200/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= -github.com/aws/aws-sdk-go v1.44.220 h1:yAj99qAt0Htjle9Up3DglgHfOP77lmFPrElA4jKnrBo= -github.com/aws/aws-sdk-go v1.44.220/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= +github.com/aws/aws-sdk-go v1.48.0 h1:1SeJ8agckRDQvnSCt1dGZYAwUaoD2Ixj6IaXB4LCv8Q= +github.com/aws/aws-sdk-go v1.48.0/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= github.com/aws/aws-sdk-go-v2 v1.17.4/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2 v1.18.1 h1:+tefE750oAb7ZQGzla6bLkOwfcQCEtC5y2RqoqCeqKo= diff --git a/internal/tests/integration/datasources_vault_ec2_test.go b/internal/tests/integration/datasources_vault_ec2_test.go index b95b0e8d..fb34f0eb 100644 --- a/internal/tests/integration/datasources_vault_ec2_test.go +++ b/internal/tests/integration/datasources_vault_ec2_test.go @@ -5,6 +5,7 @@ package integration import ( "encoding/pem" + "io" "net/http" "net/http/httptest" "testing" @@ -14,14 +15,32 @@ import ( ) func setupDatasourcesVaultEc2Test(t *testing.T) (*fs.Dir, *vaultClient, *httptest.Server, []byte) { + t.Helper() + priv, der, _ := certificateGenerate() cert := pem.EncodeToMemory(&pem.Block{Type: "CERTIFICATE", Bytes: der}) mux := http.NewServeMux() mux.HandleFunc("/latest/dynamic/instance-identity/pkcs7", pkcsHandler(priv, der)) mux.HandleFunc("/latest/dynamic/instance-identity/document", instanceDocumentHandler) + mux.HandleFunc("/latest/api/token", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + var b []byte + if r.Body != nil { + var err error + b, err = io.ReadAll(r.Body) + require.NoError(t, err) + defer r.Body.Close() + } + t.Logf("IMDS Token request: %s %s: %s", r.Method, r.URL, b) + + w.Write([]byte("testtoken")) + })) mux.HandleFunc("/sts/", stsHandler) mux.HandleFunc("/ec2/", ec2Handler) + mux.HandleFunc("/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + t.Logf("unhandled request: %s %s", r.Method, r.URL) + w.WriteHeader(http.StatusNotFound) + })) srv := httptest.NewServer(mux) t.Cleanup(srv.Close) diff --git a/render_test.go b/render_test.go index ab730d2b..21b0be74 100644 --- a/render_test.go +++ b/render_test.go @@ -156,5 +156,5 @@ func ExampleRenderer_datasources() { } // Output: - // 🚏 The Berlin Hbf transit station has 18 entrances. + // 🚏 The Berlin Hbf transit station has 20 entrances. } |
