From 5802c10904c5fc0751bee3fbfbf5a8b10630082c Mon Sep 17 00:00:00 2001 From: Shwetha Gururaj Date: Tue, 10 Jun 2025 14:26:08 -0400 Subject: [PATCH 1/3] Test release workflow --- .github/workflows/test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..51f68e8efb1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,32 @@ +name: "Test" + +permissions: + contents: write + +defaults: + run: + shell: bash + +on: + workflow_dispatch: + +jobs: + setup: + name: Setup + runs-on: ubuntu-latest + + steps: + - name: Checkout cli + uses: actions/checkout@v4 + + - name: Create draft release + uses: softprops/action-gh-release@v2 + with: + draft: true + name: "DRAFT test" + tag_name: "vTest" + fail_on_unmatched_files: true + generate_release_notes: true + files: | + Makefile + README.md From 232fa274bba92781dad0f1c23e5f67dcb7c042b7 Mon Sep 17 00:00:00 2001 From: Shwetha Gururaj Date: Fri, 8 Aug 2025 09:04:30 -0400 Subject: [PATCH 2/3] skip ssl validation for tests if needed --- integration/v7/isolated/login_command_test.go | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/integration/v7/isolated/login_command_test.go b/integration/v7/isolated/login_command_test.go index 94680e3348c..d68dda8807e 100644 --- a/integration/v7/isolated/login_command_test.go +++ b/integration/v7/isolated/login_command_test.go @@ -259,7 +259,12 @@ var _ = Describe("login command", func() { input := NewBuffer() _, err := input.Write([]byte("bad-passcode-again\nbad-passcode-strikes-back\n")) Expect(err).ToNot(HaveOccurred()) - session := helpers.CFWithStdin(input, "login", "--sso-passcode", "some-passcode") + var session *Session + if skipSSLValidation { + session = helpers.CFWithStdin(input, "login", "--sso-passcode", "some-passcode", "--skip-ssl-validation") + } else { + session = helpers.CFWithStdin(input, "login", "--sso-passcode", "some-passcode") + } Eventually(session).Should(Say("API endpoint:\\s+" + helpers.GetAPI())) Eventually(session).Should(Say(`Authenticating\.\.\.`)) Eventually(session.Err).Should(Say(`Invalid passcode`)) @@ -293,7 +298,12 @@ var _ = Describe("login command", func() { When("the user provides the --origin flag", func() { It("logs in successfully", func() { username, password := helpers.GetCredentials() - session := helpers.CF("login", "-u", username, "-p", password, "--origin", "uaa") + var session *Session + if skipSSLValidation { + session = helpers.CF("login", "-u", username, "-p", password, "--origin", "uaa", "--skip-ssl-validation") + } else { + session = helpers.CF("login", "-u", username, "-p", password, "--origin", "uaa") + } Eventually(session).Should(Say("API endpoint:\\s+" + helpers.GetAPI())) Eventually(session).Should(Say(`Authenticating\.\.\.`)) Eventually(session).Should(Say(`OK`)) @@ -402,7 +412,12 @@ var _ = Describe("login command", func() { When("the user provides the -p and -u flags", func() { Context("and the credentials are correct", func() { It("logs in successfully", func() { - session := helpers.CF("login", "-p", password, "-u", username) + var session *Session + if skipSSLValidation { + session = helpers.CF("login", "-p", password, "-u", username, "--skip-ssl-validation") + } else { + session = helpers.CF("login", "-p", password, "-u", username) + } Eventually(session).Should(Say("API endpoint:\\s+" + helpers.GetAPI())) Eventually(session).Should(Say(`Authenticating\.\.\.`)) Eventually(session).Should(Say(`OK`)) @@ -567,7 +582,12 @@ var _ = Describe("login command", func() { _, err := input.Write([]byte("3\n")) Expect(err).ToNot(HaveOccurred()) - session := helpers.CFWithStdin(input, "login", "-u", username, "-p", password) + var session *Session + if skipSSLValidation { + session = helpers.CFWithStdin(input, "login", "-u", username, "-p", password, "--skip-ssl-validation") + } else { + session = helpers.CFWithStdin(input, "login", "-u", username, "-p", password) + } Eventually(session).Should(Say(regexp.QuoteMeta("Select an org:"))) Eventually(session).Should(Say(regexp.QuoteMeta(`Org (enter to skip):`))) From 154184068efeed7100e868247c78874c043a65c0 Mon Sep 17 00:00:00 2001 From: Shwetha Gururaj Date: Fri, 8 Aug 2025 09:08:42 -0400 Subject: [PATCH 3/3] Cleanup --- .github/workflows/test.yml | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 51f68e8efb1..00000000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Test" - -permissions: - contents: write - -defaults: - run: - shell: bash - -on: - workflow_dispatch: - -jobs: - setup: - name: Setup - runs-on: ubuntu-latest - - steps: - - name: Checkout cli - uses: actions/checkout@v4 - - - name: Create draft release - uses: softprops/action-gh-release@v2 - with: - draft: true - name: "DRAFT test" - tag_name: "vTest" - fail_on_unmatched_files: true - generate_release_notes: true - files: | - Makefile - README.md