Skip to content

Commit

Permalink
manual fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
apeabody committed Dec 23, 2024
1 parent f2a30e8 commit 3044f50
Show file tree
Hide file tree
Showing 7 changed files with 117 additions and 118 deletions.
2 changes: 1 addition & 1 deletion cli/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
SHELL := /bin/bash

# Changing this value will trigger a new release
VERSION=v1.5.11
VERSION=v1.5.12
BINARY=bin/cft
GITHUB_REPO=github.com/GoogleCloudPlatform/cloud-foundation-toolkit
PLATFORMS := linux windows darwin
Expand Down
2 changes: 1 addition & 1 deletion cli/bpcatalog/gh.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"sort"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
"golang.org/x/oauth2"
)

Expand Down
30 changes: 15 additions & 15 deletions cli/bpcatalog/render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
"github.com/stretchr/testify/assert"
)

Expand All @@ -21,20 +21,20 @@ const (
func TestRender(t *testing.T) {
testRepoData := repos{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: time.Date(2021, 1, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(5),
Description: github.String("lorem ipsom"),
StargazersCount: github.Ptr(5),
Description: github.Ptr("lorem ipsom"),
},
{
Name: github.String("terraform-google-foo"),
Name: github.Ptr("terraform-google-foo"),
CreatedAt: &github.Timestamp{Time: time.Date(2022, 11, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
},
{
Name: github.String("terraform-foo"),
Name: github.Ptr("terraform-foo"),
CreatedAt: &github.Timestamp{Time: time.Date(2022, 11, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
Topics: []string{"unrelated", e2eLabel, "containers"},
},
}
Expand Down Expand Up @@ -213,22 +213,22 @@ func TestReposToDisplayMeta(t *testing.T) {
name: "simple",
input: repos{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: time.Date(2021, 1, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(5),
Description: github.String("lorem ipsom"),
StargazersCount: github.Ptr(5),
Description: github.Ptr("lorem ipsom"),
Topics: []string{"containers"},
},
{
Name: github.String("terraform-foo"),
Name: github.Ptr("terraform-foo"),
CreatedAt: &github.Timestamp{Time: time.Date(2022, 11, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
Topics: []string{"unrelated", e2eLabel, "containers"},
},
{
Name: github.String("foo"),
Name: github.Ptr("foo"),
CreatedAt: &github.Timestamp{Time: time.Date(2022, 11, 3, 4, 3, 0, 0, time.UTC)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
},
},
want: []displayMeta{
Expand Down
2 changes: 1 addition & 1 deletion cli/bpcatalog/tf.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
)

// sortOption defines the set of sort options for catalog.
Expand Down
42 changes: 21 additions & 21 deletions cli/bpcatalog/tf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"
"time"

"github.com/google/go-github/v67/github"
"github.com/google/go-github/v68/github"
"github.com/migueleliasweb/go-github-mock/src/mock"
"github.com/stretchr/testify/assert"
)
Expand All @@ -22,15 +22,15 @@ func TestFetchSortedTFRepos(t *testing.T) {
name: "simple sort created",
repos: []github.Repository{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 3)},
},
{
Name: github.String("terraform-google-foo"),
Name: github.Ptr("terraform-google-foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
},
{
Name: github.String("foo"),
Name: github.Ptr("foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
},
},
Expand All @@ -44,15 +44,15 @@ func TestFetchSortedTFRepos(t *testing.T) {
name: "simple sort name",
repos: []github.Repository{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 3)},
},
{
Name: github.String("terraform-google-foo"),
Name: github.Ptr("terraform-google-foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
},
{
Name: github.String("foo"),
Name: github.Ptr("foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
},
},
Expand All @@ -66,24 +66,24 @@ func TestFetchSortedTFRepos(t *testing.T) {
name: "simple sort stars",
repos: []github.Repository{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 3)},
StargazersCount: github.Int(5),
StargazersCount: github.Ptr(5),
},
{
Name: github.String("terraform-google-foo"),
Name: github.Ptr("terraform-google-foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
},
{
Name: github.String("foo"),
Name: github.Ptr("foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
StargazersCount: github.Int(12),
StargazersCount: github.Ptr(12),
},
{
Name: github.String("archived"),
Name: github.Ptr("archived"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
Archived: github.Bool(true),
Archived: github.Ptr(true),
},
},
want: []string{
Expand All @@ -96,19 +96,19 @@ func TestFetchSortedTFRepos(t *testing.T) {
name: "invalid",
repos: []github.Repository{
{
Name: github.String("terraform-google-bar"),
Name: github.Ptr("terraform-google-bar"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 3)},
StargazersCount: github.Int(5),
StargazersCount: github.Ptr(5),
},
{
Name: github.String("terraform-google-foo"),
Name: github.Ptr("terraform-google-foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
StargazersCount: github.Int(10),
StargazersCount: github.Ptr(10),
},
{
Name: github.String("foo"),
Name: github.Ptr("foo"),
CreatedAt: &github.Timestamp{Time: mockT.Add(time.Hour * 2)},
StargazersCount: github.Int(12),
StargazersCount: github.Ptr(12),
},
},
wantErr: true,
Expand Down
55 changes: 26 additions & 29 deletions cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,31 @@ require (
github.com/fatih/color v1.18.0
github.com/gammazero/workerpool v1.1.3
github.com/go-git/go-git/v5 v5.12.0
github.com/golang/protobuf v1.5.4 // indirect
github.com/gomarkdown/markdown v0.0.0-20241205020045-f7e15b2f3e62
github.com/google/go-cmp v0.6.0
github.com/google/go-github/v68 v68.0.0
github.com/gruntwork-io/terratest v0.48.1
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hcl/v2 v2.23.0
github.com/hashicorp/terraform-config-inspect v0.0.0-20241129133400-c404f8227ea6
github.com/hashicorp/terraform-json v0.24.0
github.com/iancoleman/strcase v0.3.0
github.com/inconshreveable/log15 v2.16.0+incompatible
github.com/invopop/jsonschema v0.12.0
github.com/itchyny/json2yaml v0.1.4
github.com/jedib0t/go-pretty v4.3.0+incompatible
github.com/jedib0t/go-pretty/v6 v6.6.5
github.com/manifoldco/promptui v0.9.0
github.com/migueleliasweb/go-github-mock v1.1.0
github.com/mitchellh/go-testing-interface v1.14.2-0.20210821155943-2d9075ca8770
github.com/open-policy-agent/opa v1.0.0
github.com/open-policy-agent/opa v0.70.0
github.com/otiai10/copy v1.14.0
github.com/pkg/errors v0.9.1
github.com/spf13/cobra v1.8.1
github.com/spf13/viper v1.19.0
github.com/stretchr/testify v1.10.0
github.com/xeipuuv/gojsonschema v1.2.0
github.com/zclconf/go-cty v1.15.1
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/oauth2 v0.24.0
golang.org/x/text v0.21.0
google.golang.org/api v0.214.0
Expand All @@ -46,14 +47,7 @@ require (
)

require (
github.com/hashicorp/go-version v1.7.0
github.com/hashicorp/hcl/v2 v2.23.0
github.com/jedib0t/go-pretty/v6 v6.6.5

)

require (
cel.dev/expr v0.16.1 // indirect
cel.dev/expr v0.16.2 // indirect
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/accesscontextmanager v1.9.2 // indirect
cloud.google.com/go/auth v0.13.0 // indirect
Expand All @@ -65,7 +59,7 @@ require (
cloud.google.com/go/orgpolicy v1.14.1 // indirect
cloud.google.com/go/osconfig v1.14.2 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.24.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.25.0 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.48.1 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
Expand All @@ -92,11 +86,11 @@ require (
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/envoyproxy/go-control-plane v0.13.0 // indirect
github.com/envoyproxy/go-control-plane v0.13.1 // indirect
github.com/envoyproxy/protoc-gen-validate v1.1.0 // indirect
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fsnotify/fsnotify v1.8.0 // indirect
github.com/gammazero/deque v0.2.0 // indirect
github.com/go-errors/errors v1.5.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
Expand All @@ -118,6 +112,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.2.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/cel-go v0.12.6 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-github/v64 v64.0.0 // indirect
Expand All @@ -128,7 +123,7 @@ require (
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.0 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-getter/v2 v2.2.3 // indirect
Expand Down Expand Up @@ -194,31 +189,33 @@ require (
github.com/yashtewari/glob-intersection v0.2.0 // indirect
go.mongodb.org/mongo-driver v1.8.3 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.29.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/detectors/gcp v1.31.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.28.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/sdk v1.29.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0 // indirect
go.opentelemetry.io/otel/metric v1.33.0 // indirect
go.opentelemetry.io/otel/sdk v1.33.0 // indirect
go.opentelemetry.io/otel/sdk/metric v1.31.0 // indirect
go.opentelemetry.io/otel/trace v1.33.0 // indirect
go.opentelemetry.io/proto/otlp v1.4.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c // indirect
golang.org/x/mod v0.22.0 // indirect
golang.org/x/net v0.32.0 // indirect
golang.org/x/net v0.33.0 // indirect
golang.org/x/sync v0.10.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/term v0.27.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241206012308-a4fef0638583 // indirect
google.golang.org/grpc v1.67.2 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576 // indirect
google.golang.org/grpc v1.68.1 // indirect
google.golang.org/grpc/stats/opentelemetry v0.0.0-20240907200651-3ffb98b2c93a // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
Expand Down
Loading

0 comments on commit 3044f50

Please sign in to comment.