Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pete911 committed Jan 9, 2025
1 parent f872ed8 commit c903eed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ name: pipeline
on: [push]

jobs:
prereqs:
runs-on: ubuntu-latest
steps:
- name: Install libx11-dev
run: sudo apt-get update && sudo apt-get install -y libx11-dev
go:
needs:
- prereqs
uses: pete911/github-actions/.github/workflows/go.yml@main
go-release:
needs:
Expand Down
32 changes: 0 additions & 32 deletions flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func TestParseFlags(t *testing.T) {
assert.False(t, flags.PemOnly)
assert.False(t, flags.Version)
assert.Empty(t, flags.Args)
assert.False(t, flags.Clipboard)
})

t.Run("given args are set and env vars empty then flags are set to provided args", func(t *testing.T) {
Expand All @@ -51,37 +50,6 @@ func TestParseFlags(t *testing.T) {
assert.Empty(t, flags.Args)
})

t.Run("given clipboard supported and args are set and env vars empty then flags are set to provided args", func(t *testing.T) {

if !isClipboardSupported() {
t.Skip("clipboard not supported in this environment")
}

setInput(t, []string{"flag",
"-expiry=true",
"-insecure=true",
"-chains=true",
"-chains=true",
"-pem=true",
"-pem-only=true",
"-version=true",
"-clipboard=true",
}, nil)

flags, err := ParseFlags()
require.NoError(t, err)

assert.True(t, flags.Expiry)
assert.True(t, flags.Insecure)
assert.True(t, flags.Chains)
assert.True(t, flags.Pem)
assert.True(t, flags.PemOnly)
assert.True(t, flags.Version)
assert.True(t, flags.Version)
assert.Empty(t, flags.Args)
assert.True(t, flags.Clipboard)
})

t.Run("given args are not set and env vars are set then flags are set to provided env vars", func(t *testing.T) {

setInput(t, []string{"flag"}, map[string]string{
Expand Down

0 comments on commit c903eed

Please sign in to comment.