diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 488e4ef..c799dff 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,3 +10,38 @@ updates: schedule: interval: daily open-pull-requests-limit: 10 + - package-ecosystem: gomod + directory: '/lib' + schedule: + interval: weekly + open-pull-requests-limit: 10 + labels: + - 'dependencies' + - package-ecosystem: gomod + directory: '/wasp' + schedule: + interval: weekly + open-pull-requests-limit: 10 + labels: + - 'dependencies' + - package-ecosystem: gomod + directory: '/seth' + schedule: + interval: weekly + open-pull-requests-limit: 10 + labels: + - 'dependencies' + - package-ecosystem: gomod + directory: '/havoc' + schedule: + interval: weekly + open-pull-requests-limit: 10 + labels: + - 'dependencies' + - package-ecosystem: gomod + directory: '/k8s-test-runner' + schedule: + interval: weekly + open-pull-requests-limit: 10 + labels: + - 'dependencies' diff --git a/.github/workflows/dependabot-consumers-summary.yaml b/.github/workflows/dependabot-consumers-summary.yaml deleted file mode 100644 index dcede65..0000000 --- a/.github/workflows/dependabot-consumers-summary.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# This pipeline aggregates summary of Dependabot PRs for all our dependants -# Used to analyze major and alpha releases -name: Consumers Dependabot Updates - -on: - schedule: - - cron: '0 10 * * *' - workflow_dispatch: - -jobs: - find_dependabot_prs: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up jq for JSON parsing - run: | - sudo apt-get install -y jq - - name: Find Dependabot PRs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - # Define the list of repositories - repos=( - "goplugin/pluginv3.0" - "goplugin/plugin-solana" - "goplugin/plugin-cosmos" - "goplugin/plugin-starknet" - "goplugin/.github" - "goplugin/ccip" - ) - - # Define the list of packages to search for - pkgs=( - "github.com/goplugin/plugin-testing-framework/lib" - "github.com/goplugin/plugin-testing-framework/wasp" - "github.com/goplugin/plugin-testing-framework/havoc" - "github.com/goplugin/plugin-testing-framework/seth" - "github.com/goplugin/plugin-testing-framework/k8s-test-runner" - ) - - # Initialize the summary with a heading - echo "# Dependabot PRs for Bumping Dependencies" >> "$GITHUB_STEP_SUMMARY" - - # Loop through each repository and package - for repo in "${repos[@]}"; do - for pkg in "${pkgs[@]}"; do - # Construct the title pattern to search for - title_pattern="Bump $pkg from" - - # Print the repository and package in the summary - echo "### Repository: ${repo}, Dependent: ${pkg}" >> "$GITHUB_STEP_SUMMARY" - - # Search for PRs matching the pattern - prs=$(gh pr list --repo "$repo" --search "$title_pattern" --json title,url) - - # If no PRs found, print a message - if [ -z "$prs" ]; then - echo "No PRs found for $pkg in $repo" >> "$GITHUB_STEP_SUMMARY" - else - # Print the PRs in the summary - echo "$prs" | jq -r '.[] | "- [\(.title)](\(.url))"' >> "$GITHUB_STEP_SUMMARY" - fi - done - done - - - name: Print Summary - run: cat "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/release-tools.yaml b/.github/workflows/release-tools.yaml deleted file mode 100644 index 9a25800..0000000 --- a/.github/workflows/release-tools.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Release Tools -on: - push: - branches: - - main - -jobs: - tools: - strategy: - matrix: - tool: - [ - tools/citool, - tools/envresolve, - tools/gotestloghelper, - tools/testlistgenerator, - tools/ecrimagefetcher, - tools/ghlatestreleasechecker, - tools/asciitable, - tools/workflowresultparser, - ] - name: Release ${{ matrix.tool }} - runs-on: ubuntu-latest - steps: - - name: Check out Code - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 - - name: Update release tag - run: ./scripts/add_tool_release_tag.sh ${{ matrix.tool }} diff --git a/RELEASE.md b/RELEASE.md index 8af92b1..075514f 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -9,39 +9,44 @@ Use only [lightweight tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) **Do not move tags between commits. If something need to be fixed increment patch or minor version.** Steps to release: + - When all your PRs are merged to `main` check the `main` branch [breaking changes badge](https://github.com/goplugin/plugin-testing-framework/actions/workflows/rc-breaking-changes.yaml) - If there are no breaking changes for external methods, create a branch and explain all your module changes in `vX.X.X.md` committed under `.changeset` dir in your module. If changes are really short, and you run the [script](#check-breaking-changes-locally) locally you can push `.changeset` as a part of your final feature PR - If there are accidental breaking changes, and it is possible to make them backward compatible - fix them - If there are breaking changes, and we must release them change `go.mod` path, add prefix `/vX`, merge your PR(s) - When all the changes are merged, and there are no breaking changes in the [pipeline](https://github.com/goplugin/plugin-testing-framework/actions/workflows/rc-breaking-changes.yaml) then proceed with releasing - Tag `main` branch in format `$pkg/$subpkg/vX.X.X` according to your changes and push it, example: - ``` - git tag $pkg/$subpkg/v1.1.0 && git push --tags - git tag $pkg/$subpkg/v1.1.1 && git push --tags - git tag $pkg/$subpkg/v2.0.0 && git push --tags - ``` + ``` + git tag $pkg/$subpkg/v1.1.0 && git push --tags + git tag $pkg/$subpkg/v1.1.1 && git push --tags + git tag $pkg/$subpkg/v2.0.0 && git push --tags + ``` - Check the [release page](https://github.com/goplugin/plugin-testing-framework/releases) -- To check how dependency changes can affect other repositories check dependabot [summary pipeline](https://github.com/goplugin/plugin-testing-framework/actions/workflows/dependabot-consumers-summary.yaml) ### Binary releases + If your module have `cmd/main.go` we build binary automatically for various platforms and attach it to the release page. ## Debugging release pipeline and `gorelease` tool + Checkout `dummy-release-branch` and release it: + - `git tag dummy-module/v0.X.0` - Add `vX.X.X.md` in `.changeset` - `git push --no-verify --force && git push --tags` - Check [releases](https://github.com/goplugin/plugin-testing-framework/releases) Pipelines: + - [Main branch breaking changes](https://github.com/goplugin/plugin-testing-framework/actions/workflows/rc-breaking-changes.yaml) - [Pipeline for releasing Go modules](.github/workflows/release-go-module.yml) -- [Dependabot summary pipeline](.github/workflows/dependabot-consumers-summary.yaml) ## Check breaking changes locally + We have a simple wrapper to check breaking changes for all the packages. Commit all your changes and run: + ``` go run ./tools/breakingchanges/cmd/main.go go run ./tools/breakingchanges/cmd/main.go --subdir wasp # check recursively starting with subdir go run ./tools/breakingchanges/cmd/main.go --ignore tools,wasp,havoc,seth # to ignore some packages -``` \ No newline at end of file +``` diff --git a/havoc/go.mod b/havoc/go.mod index c361b33..af95c24 100644 --- a/havoc/go.mod +++ b/havoc/go.mod @@ -10,6 +10,7 @@ require ( github.com/rs/zerolog v1.33.0 //github.com/goplugin/plugin-testing-framework/lib/grafana v1.50.0 github.com/goplugin/plugin-testing-framework/lib/grafana v0.1.1 //plugin update changes + k8s.io/api v0.31.0 k8s.io/client-go v0.31.0 sigs.k8s.io/controller-runtime v0.16.2 ) diff --git a/lib/.changeset/v1.50.10.md b/lib/.changeset/v1.50.10.md new file mode 100644 index 0000000..9ee955d --- /dev/null +++ b/lib/.changeset/v1.50.10.md @@ -0,0 +1 @@ +- Added Loki client to query logs data + tests, see usage here - [README](../../README.md) \ No newline at end of file diff --git a/lib/README.md b/lib/README.md index 8b1df1a..d41b891 100644 --- a/lib/README.md +++ b/lib/README.md @@ -430,3 +430,33 @@ export RESTY_DEBUG=true ## Using AWS Secrets Manager Check the [docs](SECRETS.md) + +## Loki Client + +The `LokiClient` allows you to easily query Loki logs from your tests. It supports basic authentication, custom queries, and can be configured for (Resty) debug mode. + +### Debugging Resty and Loki Client + +```bash +export LOKI_CLIENT_LOG_LEVEL=info +export RESTY_DEBUG=true +``` + +### Example usage: + +```go +auth := LokiBasicAuth{ + Username: os.Getenv("LOKI_LOGIN"), + Password: os.Getenv("LOKI_PASSWORD"), +} + +queryParams := LokiQueryParams{ + Query: `{namespace="test"} |= "test"`, + StartTime: time.Now().AddDate(0, 0, -1), + EndTime: time.Now(), + Limit: 100, + } + +lokiClient := NewLokiClient("https://loki.api.url", "my-tenant", auth, queryParams) +logEntries, err := lokiClient.QueryLogs(context.Background()) +``` diff --git a/lib/client/loki.go b/lib/client/loki.go new file mode 100644 index 0000000..5ae4195 --- /dev/null +++ b/lib/client/loki.go @@ -0,0 +1,184 @@ +package client + +import ( + "context" + "encoding/json" + "fmt" + "os" + "time" + + "github.com/go-resty/resty/v2" + + "github.com/goplugin/plugin-testing-framework/lib/logging" +) + +// LokiAPIError is a custom error type for handling non-200 responses from the Loki API +type LokiAPIError struct { + StatusCode int + Message string +} + +// Implement the `Error` interface for LokiAPIError +func (e *LokiAPIError) Error() string { + return fmt.Sprintf("Loki API error: %s (status code: %d)", e.Message, e.StatusCode) +} + +// LokiBasicAuth holds the authentication details for Loki +type LokiBasicAuth struct { + Login string + Password string +} + +// LokiResponse represents the structure of the response from Loki +type LokiResponse struct { + Data struct { + Result []struct { + Stream map[string]string `json:"stream"` + Values [][]interface{} `json:"values"` + } `json:"result"` + } `json:"data"` +} + +// LokiLogEntry represents a single log entry with a timestamp and raw log message +type LokiLogEntry struct { + Timestamp string + Log string +} + +// LokiClient represents a client to interact with Loki for querying logs +type LokiClient struct { + BaseURL string + TenantID string + BasicAuth LokiBasicAuth + QueryParams LokiQueryParams + Logger logging.Logger + RestyClient *resty.Client +} + +// LokiQueryParams holds the parameters required for querying Loki +type LokiQueryParams struct { + Query string + StartTime time.Time + EndTime time.Time + Limit int +} + +// NewLokiClient creates a new Loki client with the given parameters, initializes a logger, and configures Resty with debug mode +func NewLokiClient(baseURL, tenantID string, auth LokiBasicAuth, queryParams LokiQueryParams) *LokiClient { + logging.Init() + + logger := logging.GetLogger(nil, "LOKI_CLIENT_LOG_LEVEL") + logger.Info(). + Str("BaseURL", baseURL). + Str("TenantID", tenantID). + Msg("Initializing Loki Client") + + // Set debug mode for Resty if RESTY_DEBUG is enabled + isDebug := os.Getenv("RESTY_DEBUG") == "true" + + restyClient := resty.New(). + SetDebug(isDebug) + + return &LokiClient{ + BaseURL: baseURL, + TenantID: tenantID, + BasicAuth: auth, + QueryParams: queryParams, + Logger: logger, + RestyClient: restyClient, + } +} + +// QueryLogs queries Loki logs based on the query parameters and returns the raw log entries +func (lc *LokiClient) QueryLogs(ctx context.Context) ([]LokiLogEntry, error) { + // Log request details + lc.Logger.Info(). + Str("Query", lc.QueryParams.Query). + Str("StartTime", lc.QueryParams.StartTime.Format(time.RFC3339Nano)). + Str("EndTime", lc.QueryParams.EndTime.Format(time.RFC3339Nano)). + Int("Limit", lc.QueryParams.Limit). + Msg("Making request to Loki API") + + // Start tracking request duration + start := time.Now() + + // Build query parameters + params := map[string]string{ + "query": lc.QueryParams.Query, + "start": lc.QueryParams.StartTime.Format(time.RFC3339Nano), + "end": lc.QueryParams.EndTime.Format(time.RFC3339Nano), + "limit": fmt.Sprintf("%d", lc.QueryParams.Limit), + } + + // Send request using the pre-configured Resty client + resp, err := lc.RestyClient.R(). + SetContext(ctx). + SetHeader("X-Scope-OrgID", lc.TenantID). + SetBasicAuth(lc.BasicAuth.Login, lc.BasicAuth.Password). + SetQueryParams(params). + Get(lc.BaseURL + "/loki/api/v1/query_range") + + // Track request duration + duration := time.Since(start) + + if err != nil { + lc.Logger.Error().Err(err).Dur("duration", duration).Msg("Error querying Loki") + return nil, err + } + + // Log non-200 responses + if resp.StatusCode() != 200 { + bodySnippet := string(resp.Body()) + if len(bodySnippet) > 200 { + bodySnippet = bodySnippet[:200] + "..." + } + lc.Logger.Error(). + Int("StatusCode", resp.StatusCode()). + Dur("duration", duration). + Str("ResponseBody", bodySnippet). + Msg("Loki API returned non-200 status") + return nil, &LokiAPIError{ + StatusCode: resp.StatusCode(), + Message: "unexpected status code from Loki API", + } + } + + // Log successful response + lc.Logger.Info(). + Int("StatusCode", resp.StatusCode()). + Dur("duration", duration). + Msg("Successfully queried Loki API") + + // Parse the response into the LokiResponse struct + var lokiResp LokiResponse + if err := json.Unmarshal(resp.Body(), &lokiResp); err != nil { + lc.Logger.Error().Err(err).Msg("Error decoding response from Loki") + return nil, err + } + + // Extract log entries from the response + logEntries := lc.extractRawLogEntries(lokiResp) + + // Log the number of entries retrieved + lc.Logger.Info().Int("LogEntries", len(logEntries)).Msg("Successfully retrieved logs from Loki") + + return logEntries, nil +} + +// extractRawLogEntries processes the LokiResponse and returns raw log entries +func (lc *LokiClient) extractRawLogEntries(lokiResp LokiResponse) []LokiLogEntry { + var logEntries []LokiLogEntry + + for _, result := range lokiResp.Data.Result { + for _, entry := range result.Values { + timestamp := entry[0].(string) + logLine := entry[1].(string) + logEntries = append(logEntries, LokiLogEntry{ + Timestamp: timestamp, + Log: logLine, + }) + } + } + + return logEntries +} diff --git a/lib/client/loki_test.go b/lib/client/loki_test.go new file mode 100644 index 0000000..9d2b778 --- /dev/null +++ b/lib/client/loki_test.go @@ -0,0 +1,181 @@ +package client + +import ( + "context" + "errors" + "net/http" + "net/http/httptest" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +// TestLokiClient_QueryLogs tests the LokiClient's ability to query Loki logs +func TestLokiClient_SuccessfulQuery(t *testing.T) { + // Create a mock Loki server using httptest + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "/loki/api/v1/query_range", r.URL.Path) + w.WriteHeader(http.StatusOK) + _, err := w.Write([]byte(`{ + "data": { + "result": [ + { + "stream": {"namespace": "test"}, + "values": [ + ["1234567890", "Log message 1"], + ["1234567891", "Log message 2"] + ] + } + ] + } + }`)) + assert.NoError(t, err) + })) + defer mockServer.Close() + + // Create a BasicAuth object for testing + auth := LokiBasicAuth{ + Login: "test-login", + Password: "test-password", + } + + // Set the query parameters + queryParams := LokiQueryParams{ + Query: `{namespace="test"}`, + StartTime: time.Now().Add(-1 * time.Hour), + EndTime: time.Now(), + Limit: 100, + } + + // Create the Loki client with the mock server URL + lokiClient := NewLokiClient(mockServer.URL, "test-tenant", auth, queryParams) + + // Query logs + logEntries, err := lokiClient.QueryLogs(context.Background()) + assert.NoError(t, err) + assert.Len(t, logEntries, 2) + + // Verify the content of the log entries + assert.Equal(t, "1234567890", logEntries[0].Timestamp) + assert.Equal(t, "Log message 1", logEntries[0].Log) + assert.Equal(t, "1234567891", logEntries[1].Timestamp) + assert.Equal(t, "Log message 2", logEntries[1].Log) +} + +func TestLokiClient_AuthenticationFailure(t *testing.T) { + // Create a mock Loki server + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "/loki/api/v1/query_range", r.URL.Path) + w.WriteHeader(http.StatusUnauthorized) // Simulate authentication failure + })) + defer mockServer.Close() + + // Create a Loki client with incorrect credentials + auth := LokiBasicAuth{ + Login: "wrong-login", + Password: "wrong-password", + } + queryParams := LokiQueryParams{ + Query: `{namespace="test"}`, + StartTime: time.Now().Add(-1 * time.Hour), + EndTime: time.Now(), + Limit: 100, + } + lokiClient := NewLokiClient(mockServer.URL, "test-tenant", auth, queryParams) + + // Query logs and expect an error + logEntries, err := lokiClient.QueryLogs(context.Background()) + assert.Nil(t, logEntries) + assert.Error(t, err) + var lokiErr *LokiAPIError + if errors.As(err, &lokiErr) { + assert.Equal(t, http.StatusUnauthorized, lokiErr.StatusCode) + } else { + t.Fatalf("Expected LokiAPIError, got %v", err) + } +} + +func TestLokiClient_InternalServerError(t *testing.T) { + // Create a mock Loki server + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "/loki/api/v1/query_range", r.URL.Path) + w.WriteHeader(http.StatusInternalServerError) // Simulate server error + _, err := w.Write([]byte(`{"message": "internal server error"}`)) // Error message in the response body + assert.NoError(t, err) + })) + defer mockServer.Close() + + // Create a Loki client + auth := LokiBasicAuth{ + Login: "test-login", + Password: "test-password", + } + queryParams := LokiQueryParams{ + Query: `{namespace="test"}`, + StartTime: time.Now().Add(-1 * time.Hour), + EndTime: time.Now(), + Limit: 100, + } + lokiClient := NewLokiClient(mockServer.URL, "test-tenant", auth, queryParams) + + // Query logs and expect an error + logEntries, err := lokiClient.QueryLogs(context.Background()) + assert.Nil(t, logEntries) + assert.Error(t, err) + var lokiErr *LokiAPIError + if errors.As(err, &lokiErr) { + assert.Equal(t, http.StatusInternalServerError, lokiErr.StatusCode) + } else { + t.Fatalf("Expected LokiAPIError, got %v", err) + } +} + +func TestLokiClient_DebugMode(t *testing.T) { + // Set the RESTY_DEBUG environment variable + os.Setenv("RESTY_DEBUG", "true") + defer os.Unsetenv("RESTY_DEBUG") // Clean up after the test + + // Create a mock Loki server + mockServer := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + assert.Equal(t, "/loki/api/v1/query_range", r.URL.Path) + w.WriteHeader(http.StatusOK) + _, err := w.Write([]byte(`{ + "data": { + "result": [ + { + "stream": {"namespace": "test"}, + "values": [ + ["1234567890", "Log message 1"], + ["1234567891", "Log message 2"] + ] + } + ] + } + }`)) + assert.NoError(t, err) + })) + defer mockServer.Close() + + // Create a Loki client + auth := LokiBasicAuth{ + Login: "test-login", + Password: "test-password", + } + queryParams := LokiQueryParams{ + Query: `{namespace="test"}`, + StartTime: time.Now().Add(-1 * time.Hour), + EndTime: time.Now(), + Limit: 100, + } + lokiClient := NewLokiClient(mockServer.URL, "test-tenant", auth, queryParams) + + // Query logs + logEntries, err := lokiClient.QueryLogs(context.Background()) + assert.NoError(t, err) + assert.Len(t, logEntries, 2) + + // Check if debug mode was enabled + assert.True(t, lokiClient.RestyClient.Debug) +} diff --git a/lib/client/rpc.go b/lib/client/rpc.go index 0202786..349be98 100644 --- a/lib/client/rpc.go +++ b/lib/client/rpc.go @@ -183,6 +183,25 @@ func (m *RPCClient) AnvilDropTransaction(params []interface{}) error { return nil } +// AnvilSetStorageAt sets storage at address +// API Reference https://book.getfoundry.sh/reference/anvil/ +func (m *RPCClient) AnvilSetStorageAt(params []interface{}) error { + rInt, err := rand.Int() + if err != nil { + return err + } + payload := map[string]interface{}{ + "jsonrpc": "2.0", + "method": "anvil_setStorageAt", + "params": params, + "id": rInt, + } + if _, err := m.client.R().SetBody(payload).Post(m.URL); err != nil { + return errors.Wrap(err, "anvil_setStorageAt") + } + return nil +} + type CurrentBlockResponse struct { Result string `json:"result"` } diff --git a/lib/client/rpc_test.go b/lib/client/rpc_test.go index 0f4b739..f5adcc5 100644 --- a/lib/client/rpc_test.go +++ b/lib/client/rpc_test.go @@ -3,6 +3,7 @@ package client import ( "context" "crypto/ecdsa" + "encoding/hex" "math/big" "testing" "time" @@ -130,6 +131,28 @@ func TestRPCAPI(t *testing.T) { t.Logf("status: %v", status) }) + t.Run("(anvil) test set storage at address", func(t *testing.T) { + ac, err := StartAnvil([]string{"--balance", "1", "--block-time", "5"}) + require.NoError(t, err) + client, err := ethclient.Dial(ac.URL) + require.NoError(t, err) + + randomAddress := common.HexToAddress("0x0d2026b3EE6eC71FC6746ADb6311F6d3Ba1C000B") + storeValue := "0x0000000000000000000000000000000000000000000000000000000000000001" + + anvilClient := NewRPCClient(ac.URL, nil) + err = anvilClient.AnvilSetStorageAt([]interface{}{randomAddress.Hex(), "0x0", storeValue}) + require.NoError(t, err, "unable to set storage at address") + + value, err := client.StorageAt(context.Background(), randomAddress, common.HexToHash("0x0"), nil) + require.NoError(t, err) + decodedStoreValue, err := hex.DecodeString(storeValue[2:]) + require.NoError(t, err, "unable to decode store value") + require.Equal(t, decodedStoreValue, value) + + t.Logf("value: %v", value) + }) + t.Run("(anvil) test we can shrink the block and control transaction inclusion", func(t *testing.T) { ac, err := StartAnvil([]string{"--balance", "1", "--block-time", "1"}) require.NoError(t, err) diff --git a/lib/docker/docker.go b/lib/docker/docker.go index 0960589..600ad8b 100644 --- a/lib/docker/docker.go +++ b/lib/docker/docker.go @@ -24,13 +24,14 @@ func CreateNetwork(l zerolog.Logger) (*tc.DockerNetwork, error) { // our custom registry and then using the default Ryuk image //nolint:staticcheck reaperCO := tc.WithImageName(ryukImage) + f := false //nolint:staticcheck network, err := tc.GenericNetwork(testcontext.Get(nil), tc.GenericNetworkRequest{ //nolint:staticcheck NetworkRequest: tc.NetworkRequest{ Name: networkName, CheckDuplicate: true, - EnableIPv6: false, // disabling due to https://github.com/moby/moby/issues/42442 + EnableIPv6: &f, // disabling due to https://github.com/moby/moby/issues/42442 ReaperOptions: []tc.ContainerOption{ reaperCO, }, diff --git a/lib/go.mod b/lib/go.mod index 5aa2de2..ef4eb72 100644 --- a/lib/go.mod +++ b/lib/go.mod @@ -13,7 +13,7 @@ require ( github.com/barkimedes/go-deepcopy v0.0.0-20220514131651-17c30cfc62df github.com/cdk8s-team/cdk8s-core-go/cdk8s/v2 v2.7.5 github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240709130330-9f4feec7553f - github.com/docker/docker v25.0.2+incompatible + github.com/docker/docker v27.3.1+incompatible github.com/docker/go-connections v0.5.0 github.com/ethereum/go-ethereum v1.13.8 github.com/go-resty/resty/v2 v2.11.0 @@ -39,7 +39,7 @@ require ( github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.9.0 - github.com/testcontainers/testcontainers-go v0.28.0 + github.com/testcontainers/testcontainers-go v0.33.0 go.uber.org/atomic v1.11.0 go.uber.org/zap v1.26.0 golang.org/x/net v0.29.0 @@ -53,14 +53,6 @@ require ( k8s.io/kubectl v0.31.0 ) -require ( - github.com/blang/semver/v4 v4.0.0 // indirect - github.com/fxamacker/cbor/v2 v2.7.0 // indirect - github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect - github.com/x448/float16 v0.8.4 // indirect - gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect -) - require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v1.7.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.3.0 // indirect @@ -71,8 +63,8 @@ require ( github.com/MakeNowJust/heredoc v1.0.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/sprig/v3 v3.2.3 // indirect - github.com/Microsoft/go-winio v0.6.1 // indirect - github.com/Microsoft/hcsshim v0.11.4 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/OneOfOne/xxhash v1.2.8 // indirect github.com/VictoriaMetrics/fastcache v1.12.1 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/armon/go-metrics v0.4.1 // indirect @@ -94,6 +86,7 @@ require ( github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect + github.com/blang/semver/v4 v4.0.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/bytedance/sonic v1.9.1 // indirect @@ -111,8 +104,8 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/bavard v0.1.13 // indirect github.com/consensys/gnark-crypto v0.12.1 // indirect - github.com/containerd/containerd v1.7.12 // indirect github.com/containerd/log v0.1.0 // indirect + github.com/containerd/platforms v0.2.1 // indirect github.com/coreos/go-semver v0.3.1 // indirect github.com/coreos/go-systemd/v22 v22.5.0 // indirect github.com/cpuguy83/dockercfg v0.3.1 // indirect @@ -123,7 +116,7 @@ require ( github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect - github.com/distribution/reference v0.5.0 // indirect + github.com/distribution/reference v0.6.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/edsrzf/mmap-go v1.1.0 // indirect @@ -136,6 +129,7 @@ require ( github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect + github.com/fxamacker/cbor/v2 v2.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.2 // indirect github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect github.com/getsentry/sentry-go v0.19.0 // indirect @@ -225,10 +219,12 @@ require ( github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mitchellh/reflectwalk v1.0.1 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect + github.com/moby/docker-image-spec v1.3.1 // indirect github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/spdystream v0.4.0 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/moby/sys/user v0.1.0 // indirect + github.com/moby/sys/userns v0.1.0 // indirect github.com/moby/term v0.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect @@ -237,10 +233,11 @@ require ( github.com/morikuni/aec v1.0.0 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect github.com/oklog/ulid v1.3.1 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect - github.com/opencontainers/image-spec v1.1.0-rc5 // indirect + github.com/opencontainers/image-spec v1.1.0 // indirect github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e // indirect github.com/opentracing-contrib/go-stdlib v1.0.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect @@ -280,6 +277,7 @@ require ( github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ugorji/go/codec v1.2.11 // indirect + github.com/x448/float16 v0.8.4 // indirect github.com/xlab/treeprint v1.2.0 // indirect github.com/yusufpapurcu/wmi v1.2.3 // indirect go.etcd.io/etcd/api/v3 v3.5.14 // indirect @@ -290,6 +288,7 @@ require ( go.opentelemetry.io/collector/semconv v0.81.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.53.0 // indirect go.opentelemetry.io/otel v1.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.28.0 // indirect go.opentelemetry.io/otel/trace v1.28.0 // indirect go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect @@ -310,6 +309,7 @@ require ( google.golang.org/genproto/googleapis/rpc v0.0.0-20240701130421-f6361c86f094 // indirect google.golang.org/grpc v1.65.0 google.golang.org/protobuf v1.34.2 // indirect + gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/lib/go.sum b/lib/go.sum index db969a8..8d04168 100644 --- a/lib/go.sum +++ b/lib/go.sum @@ -83,10 +83,8 @@ github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0 github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj9n6YA= github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= -github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.11.4 h1:68vKo2VN8DE9AdN4tnkWnmdhqdbpUFM8OF3Airm7fz8= -github.com/Microsoft/hcsshim v0.11.4/go.mod h1:smjE4dvqPX9Zldna+t5FG3rnoHhaB7QYxPRqGcpAD9w= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= @@ -241,10 +239,10 @@ github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/Yj github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= -github.com/containerd/containerd v1.7.12 h1:+KQsnv4VnzyxWcfO9mlxxELaoztsDEjOuCMPAuPqgU0= -github.com/containerd/containerd v1.7.12/go.mod h1:/5OMpE1p0ylxtEUGY8kuCYkDRzJm9NO1TFMWjUpdevk= github.com/containerd/log v0.1.0 h1:TCJt7ioM2cr/tfR8GPbGf9/VRAX8D2B4PjzCpfX540I= github.com/containerd/log v0.1.0/go.mod h1:VRRf09a7mHDIRezVKTRCrOq78v577GXq3bSa3EhrzVo= +github.com/containerd/platforms v0.2.1 h1:zvwtM3rz2YHPQsF2CHYM8+KtB5dvhISiXh5ZpSBQv6A= +github.com/containerd/platforms v0.2.1/go.mod h1:XHCb+2/hzowdiut9rkudds9bE5yJ7npe7dG/wG+uFPw= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -283,12 +281,12 @@ github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/r github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/digitalocean/godo v1.99.0 h1:gUHO7n9bDaZFWvbzOum4bXE0/09ZuYA9yA8idQHX57E= github.com/digitalocean/godo v1.99.0/go.mod h1:SsS2oXo2rznfM/nORlZ/6JaUJZFhmKTib1YhopUc8NA= -github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= -github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= +github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk= +github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= -github.com/docker/docker v25.0.2+incompatible h1:/OaKeauroa10K4Nqavw4zlhcDq/WBcPMc5DbjOGgozY= -github.com/docker/docker v25.0.2+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI= +github.com/docker/docker v27.3.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/go-connections v0.5.0 h1:USnMq7hx7gwdVZq1L49hLXaFtUdTADjXGp+uj1Br63c= github.com/docker/go-connections v0.5.0/go.mod h1:ov60Kzw0kKElRwhNs9UlUHAE/F9Fe6GLaXnqyDdmEXc= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= @@ -848,6 +846,8 @@ github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= +github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0= +github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/spdystream v0.4.0 h1:Vy79D6mHeJJjiPdFEL2yku1kl0chZpJfZcPpb16BRl8= @@ -856,6 +856,8 @@ github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5 github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/user v0.1.0 h1:WmZ93f5Ux6het5iituh9x2zAG7NFY9Aqi49jjE1PaQg= github.com/moby/sys/user v0.1.0/go.mod h1:fKJhFOnsCN6xZ5gSfbM6zaHGgDJMrqt9/reuj4T7MmU= +github.com/moby/sys/userns v0.1.0 h1:tVLXkFOxVu9A64/yh59slHVv9ahO9UIev4JZusOLG/g= +github.com/moby/sys/userns v0.1.0/go.mod h1:IHUYgu/kao6N8YZlp9Cf444ySSvCmDlmzUcYfDHOl28= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -909,8 +911,8 @@ github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/image-spec v1.1.0-rc5/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= +github.com/opencontainers/image-spec v1.1.0 h1:8SG7/vwALn54lVB/0yZ/MMwhFrPYtpEHQb2IpWsCzug= +github.com/opencontainers/image-spec v1.1.0/go.mod h1:W4s4sFTMaBeK1BQLXbG4AdM2szdn85PY75RI83NrTrM= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= @@ -1099,8 +1101,8 @@ github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbe github.com/supranational/blst v0.3.11/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d h1:vfofYNRScrDdvS342BElfbETmL1Aiz3i2t0zfRj16Hs= github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d/go.mod h1:RRCYJbIwD5jmqPI9XoAFR0OcDxqUctll6zUj/+B4S48= -github.com/testcontainers/testcontainers-go v0.28.0 h1:1HLm9qm+J5VikzFDYhOd+Zw12NtOl+8drH2E8nTY1r8= -github.com/testcontainers/testcontainers-go v0.28.0/go.mod h1:COlDpUXbwW3owtpMkEB1zo9gwb1CoKVKlyrVPejF4AU= +github.com/testcontainers/testcontainers-go v0.33.0 h1:zJS9PfXYT5O0ZFXM2xxXfk4J5UMw/kRiISng037Gxdw= +github.com/testcontainers/testcontainers-go v0.33.0/go.mod h1:W80YpTa8D5C3Yy16icheD01UTDu+LmXIA2Keo+jWtT8= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= @@ -1121,7 +1123,6 @@ github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljT github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= -github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli/v2 v2.25.7 h1:VAzn5oq403l5pHjc4OhD54+XGO9cdKVL/7lDjF+iKUs= github.com/urfave/cli/v2 v2.25.7/go.mod h1:8qnjx1vcq5s2/wpsqoZFndg2CE5tNFyrTvS6SinrnYQ= github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= @@ -1662,8 +1663,8 @@ gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/lib/k8s/e2e/common/test_common.go b/lib/k8s/e2e/common/test_common.go index e8acaa2..0ad27c1 100644 --- a/lib/k8s/e2e/common/test_common.go +++ b/lib/k8s/e2e/common/test_common.go @@ -111,6 +111,8 @@ func TestConnectWithoutManifest(t *testing.T) { existingEnv = environment.New(existingEnvConfig) l.Info().Str("Namespace", existingEnvConfig.Namespace).Msg("Existing Env Namespace") // deploy environment to use as an existing one for the test + require.NotNil(t, existingEnv, "existingEnv is nil") + require.NotNil(t, existingEnv.Cfg, "existingEnv.Cfg is nil %v", existingEnv) existingEnv.Cfg.JobImage = "" existingEnv.AddHelm(ethereum.New(nil)). AddHelm(plugin.New(0, map[string]any{ diff --git a/lib/logging/log.go b/lib/logging/log.go index 5288a8c..19384f3 100644 --- a/lib/logging/log.go +++ b/lib/logging/log.go @@ -17,6 +17,9 @@ import ( const afterTestEndedMsg = "LOG AFTER TEST ENDED" +// Logger is an alias for zerolog.Logger, exposed through the logging package +type Logger = zerolog.Logger + // CustomT wraps testing.T for two purposes: // 1. it implements Write to override the default logger // 2. it implements Printf to implement the testcontainers-go/Logging interface diff --git a/tools/breakingchanges/cmd/main.go b/tools/breakingchanges/cmd/main.go index 3c336ad..60c2a5e 100644 --- a/tools/breakingchanges/cmd/main.go +++ b/tools/breakingchanges/cmd/main.go @@ -48,6 +48,7 @@ func findGoModDirs(rootFolder, subDir string) ([]string, error) { } func getLastTag(pathPrefix string) (string, error) { + //nolint cmd := exec.Command("sh", "-c", fmt.Sprintf("git tag | grep '%s' | tail -1", pathPrefix)) var out bytes.Buffer cmd.Stdout = &out @@ -88,9 +89,7 @@ func getIgnoredDirs(flag *string) []string { ignoredDirs := make([]string, 0) if flag != nil { allDirs := strings.Split(*flag, ",") - for _, d := range allDirs { - ignoredDirs = append(ignoredDirs, d) - } + ignoredDirs = append(ignoredDirs, allDirs...) } return ignoredDirs } diff --git a/tools/breakingchanges/go.sum b/tools/breakingchanges/go.sum index e584c1b..e69de29 100644 --- a/tools/breakingchanges/go.sum +++ b/tools/breakingchanges/go.sum @@ -1,2 +0,0 @@ -golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= -golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= diff --git a/tools/gotestloghelper/go.mod b/tools/gotestloghelper/go.mod index 0662da3..9ff862d 100644 --- a/tools/gotestloghelper/go.mod +++ b/tools/gotestloghelper/go.mod @@ -3,8 +3,8 @@ module github.com/goplugin/plugin-testing-framework/tools/gotestloghelper go 1.22.5 require ( - //github.com/goplugin/plugin-testing-framework/lib v1.99.4-0.20240903123107-cd7909d3e9fb - github.com/goplugin/plugin-testing-framework/lib v0.0.1 //plugin latest update + //github.com/goplugin/plugin-testing-framework/lib v1.50.10 + github.com/goplugin/plugin-testing-framework/lib v0.3.1 //plugin latest update github.com/stretchr/testify v1.9.0 ) diff --git a/tools/gotestloghelper/go.sum b/tools/gotestloghelper/go.sum index 8ff35e0..37130b3 100644 --- a/tools/gotestloghelper/go.sum +++ b/tools/gotestloghelper/go.sum @@ -4,8 +4,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U= github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/goplugin/plugin-testing-framework/lib v1.99.4-0.20240903123107-cd7909d3e9fb h1:3FUCF0KLWOVJdtTeSGhiSZYsNY7yimqW99k67f2vY+E= -github.com/goplugin/plugin-testing-framework/lib v1.99.4-0.20240903123107-cd7909d3e9fb/go.mod h1:sJt0auUnNSN/bYhSyucgWi8hcWGEMAxc3+Vg6+zWmCw= +github.com/goplugin/plugin-testing-framework/lib v1.50.10 h1:FQss3hzNBkwzIJ8TQNHeYnXZkVepzNERv5HZhm9VbjU= +github.com/goplugin/plugin-testing-framework/lib v1.50.10/go.mod h1:7R5wGWWJi0dr5Y5cXbLQ4vSeIj0ElvhBaymcfvqqUmo= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=