Skip to content

Commit

Permalink
chore: Resolve conflicts with incoming branch
Browse files Browse the repository at this point in the history
  • Loading branch information
m8rmclaren committed Oct 9, 2023
1 parent 1505258 commit 62129d5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 7 deletions.
30 changes: 29 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -381,4 +381,32 @@ jobs:
# unset KFUTIL_DEBUG
# kfutil logout || true
# printenv | grep -i keyfactor
# go test -v ./cmd -run "^Test_PAM*"
# go test -v ./cmd -run "^Test_PAM*"

Test_Kfutil_pkg:
runs-on: ubuntu-latest
needs:
- build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
# Checkout code
# https://github.com/actions/checkout
- name: Checkout code
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0

# Setup GoLang build environment
# https://github.com/actions/setup-go
- name: Set up Go 1.x
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: 'go.mod'
cache: true

# Install dependencies
- name: Install dependencies
run: go mod download

# Run the tests with coverage found in the pkg directory
- name: Run tests
run: go test -v -cover ./pkg/...
9 changes: 3 additions & 6 deletions cmd/helm_uo.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,14 @@ func (f *HelmUoFlags) ToOptions(cmd *cobra.Command, args []string) (*HelmUoOptio
flags.GetDebugFlag(cmd)

// Determine if feature is enabled
expEnabled, _ := cmd.Flags().GetBool("exp")
_, err := IsExperimentalFeatureEnabled(expEnabled, true)
expEnabled, _ = cmd.Flags().GetBool("exp")
_, err := isExperimentalFeatureEnabled(expEnabled, true)
if err != nil {
return nil, fmt.Errorf("feature gate check failed: %s", err)
}

// Get the command config entry from global flags
noPrompt := flags.GetNoPromptFlag(cmd)
profile := flags.GetProfileFlag(cmd)
configFile := flags.GetConfigFlag(cmd)
commandConfig, _ := authConfigFile(configFile, profile, noPrompt, false)
commandConfig, _ := authConfigFile(configFile, profile, "", noPrompt, false)

// Get the hostname from the command config
entry, ok := commandConfig.Servers[profile]
Expand Down
1 change: 1 addition & 0 deletions pkg/cmdutil/extensions/extension_installer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ func TestExtensionInstaller_cacheExtensionsDir(t *testing.T) {
func TestExtensionInstaller_applyUpgradesToExtensionsToInstall(t *testing.T) {
builder := NewExtensionInstallerBuilder()
builder.currentlyInstalled = make(Extensions)
builder.Token(GetGithubToken())

// Get an extension
extension, err := NewGithubReleaseFetcher("", GetGithubToken()).GetFirstExtension()
Expand Down
1 change: 1 addition & 0 deletions pkg/helm/uo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ func TestNewUniversalOrchestratorHelmValueBuilder(t *testing.T) {
}

builder := NewUniversalOrchestratorHelmValueBuilder().
Token(GetGithubToken()).
InteractiveMode(false).
Extensions([]string{string(extension)})

Expand Down

0 comments on commit 62129d5

Please sign in to comment.