From c903eed00de165bc7a63731d40d1e6096807af83 Mon Sep 17 00:00:00 2001 From: "peter.reisinger" Date: Thu, 9 Jan 2025 19:32:34 +0000 Subject: [PATCH] fix tests --- .github/workflows/pipeline.yml | 7 ------- flag_test.go | 32 -------------------------------- 2 files changed, 39 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 0b9cf0f..630e175 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -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: diff --git a/flag_test.go b/flag_test.go index 9aa27c0..15f3627 100644 --- a/flag_test.go +++ b/flag_test.go @@ -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) { @@ -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{