Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Sanft <[email protected]>
  • Loading branch information
msanft committed Sep 29, 2023
1 parent b45d920 commit f43be93
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
4 changes: 2 additions & 2 deletions cli/internal/cmd/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,14 +801,14 @@ type stubShowInfrastructure struct {
showInfraErr error
}

func (s *stubShowInfrastructure) ShowInfrastructure(_ context.Context, csp cloudprovider.Provider) (state.Infrastructure, error) {
func (s *stubShowInfrastructure) ShowInfrastructure(context.Context, cloudprovider.Provider) (state.Infrastructure, error) {
return state.Infrastructure{}, s.showInfraErr
}

type stubAttestationApplier struct {
applyErr error
}

func (a *stubAttestationApplier) ApplyJoinConfig(_ context.Context, _ config.AttestationCfg, _ []byte) error {
func (a *stubAttestationApplier) ApplyJoinConfig(context.Context, config.AttestationCfg, []byte) error {
return a.applyErr
}
11 changes: 0 additions & 11 deletions cli/internal/helm/helm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,6 @@ func TestHelmApply(t *testing.T) {
}
}

func fakeInfraOutput(csp cloudprovider.Provider) state.Infrastructure {
switch csp {
case cloudprovider.AWS:
return state.Infrastructure{}
case cloudprovider.GCP:
return state.Infrastructure{GCP: &state.GCP{}}
default:
panic("invalid csp")
}
}

func getActionReleaseNames(actions []applyAction) []string {
releaseActionNames := []string{}
for _, action := range actions {
Expand Down
2 changes: 2 additions & 0 deletions cli/internal/state/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ go_library(
importpath = "github.com/edgelesssys/constellation/v2/cli/internal/state",
visibility = ["//cli:__subpackages__"],
deps = [
"//cli/internal/clusterid",
"//internal/config",
"//internal/file",
"@cat_dario_mergo//:mergo",
Expand All @@ -18,6 +19,7 @@ go_test(
srcs = ["state_test.go"],
embed = [":state"],
deps = [
"//cli/internal/clusterid",
"//internal/constants",
"//internal/file",
"@com_github_spf13_afero//:afero",
Expand Down
2 changes: 1 addition & 1 deletion cli/internal/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (s *State) Merge(other *State) (*State, error) {
return s, nil
}

// GetClusterName returns the name of the cluster.
// ClusterName returns the name of the cluster.
func (s *State) ClusterName(cfg *config.Config) string {
return cfg.Name + "-" + s.Infrastructure.UID
}
Expand Down

0 comments on commit f43be93

Please sign in to comment.