diff --git a/.github/actions/cloud-slack-e2e/action.yaml b/.github/actions/cloud-slack-e2e/action.yaml index 953671d7f..fbc1dc640 100644 --- a/.github/actions/cloud-slack-e2e/action.yaml +++ b/.github/actions/cloud-slack-e2e/action.yaml @@ -123,15 +123,15 @@ runs: echo "footer=${FOOTER}" >> $GITHUB_OUTPUT -# - name: Slack Notification -# uses: rtCamp/action-slack-notify@v2 -# if: ${{ failure() }} -# env: -# SLACK_CHANNEL: 'botkube-cloud-ci-alerts' -# SLACK_USERNAME: Botkube Cloud CI -# SLACK_COLOR: 'red' -# SLACK_TITLE: 'Message' -# SLACK_MESSAGE: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:" -# SLACK_ICON_EMOJI: ':this-is-fine-fire:' -# SLACK_FOOTER: ${{ steps.footer.outputs.footer }} -# SLACK_WEBHOOK: ${{ inputs.slack_alerts_webhook }} + - name: Slack Notification + uses: rtCamp/action-slack-notify@v2 + if: ${{ failure() }} + env: + SLACK_CHANNEL: 'botkube-cloud-ci-alerts' + SLACK_USERNAME: Botkube Cloud CI + SLACK_COLOR: 'red' + SLACK_TITLE: 'Message' + SLACK_MESSAGE: "Cloud Slack ${{ inputs.e2e_type }} E2E tests failed :scream:" + SLACK_ICON_EMOJI: ':this-is-fine-fire:' + SLACK_FOOTER: ${{ steps.footer.outputs.footer }} + SLACK_WEBHOOK: ${{ inputs.slack_alerts_webhook }} diff --git a/.github/workflows/test-ui-e2e-tests.yml b/.github/workflows/test-ui-e2e-tests.yml deleted file mode 100644 index 760be16c7..000000000 --- a/.github/workflows/test-ui-e2e-tests.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Test UI E2E tests on PR - -on: - push: - branches: - - extend-ui-tests - -env: - GIT_USER: botkube-dev - HELM_VERSION: v3.9.0 - K3D_VERSION: v5.4.6 - IMAGE_REGISTRY: "ghcr.io" - IMAGE_REPOSITORY: "kubeshop/botkube" - IMAGE_TAG: v9.99.9-dev # TODO: Use commit hash tag to make the predictable builds for each commit on branch - -jobs: - cloud-slack-dev-e2e: - name: Botkube Cloud Slack Dev E2E - runs-on: ubuntu-latest - permissions: - contents: read - packages: read - concurrency: - group: cloud-slack-dev-e2e - cancel-in-progress: false - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Run e2e tests - uses: ./.github/actions/cloud-slack-e2e - with: - access_token: ${{ secrets.E2E_TEST_GH_DEV_ACCOUNT_PAT }} - - slack_workspace_name: ${{ secrets.E2E_DEV_SLACK_WORKSPACE_NAME }} - slack_email: ${{ secrets.E2E_DEV_SLACK_EMAIL }} - slack_password: ${{ secrets.E2E_DEV_SLACK_USER_PASSWORD }} - slack_bot_display_name: "BotkubeDev" - slack_tester_bot_token: ${{ secrets.E2E_DEV_SLACK_TESTER_BOT_TOKEN }} - slack_tester_bot_name: "botkubedev" - - botkube_cloud_api_base_url: "https://api-dev.botkube.io" - botkube_cloud_email: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_EMAIL }} - botkube_cloud_password: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_PASSWORD }} - botkube_cloud_team_organization_id: ${{ secrets.E2E_DEV_BOTKUBE_CLOUD_TEAM_ORGANIZATION_ID }} - - slack_alerts_webhook: ${{ secrets.SLACK_CI_ALERTS_WEBHOOK }} - - e2e_type: "DEV" diff --git a/test/cloud-slack-dev-e2e/botkube_page_helpers_test.go b/test/cloud-slack-dev-e2e/botkube_page_helpers_test.go index 3699b0aa5..f427553d9 100644 --- a/test/cloud-slack-dev-e2e/botkube_page_helpers_test.go +++ b/test/cloud-slack-dev-e2e/botkube_page_helpers_test.go @@ -131,7 +131,6 @@ func (p *BotkubeCloudPage) OpenSlackAppIntegrationPage(t *testing.T) { // ReAddSlackPlatformIfShould add the slack platform again as the page was often not refreshed with a newly connected Slack Workspace. // It only occurs with headless mode. -// TODO(@pkosiec): Do you have a better idea how to fix it? func (p *BotkubeCloudPage) ReAddSlackPlatformIfShould(t *testing.T, isHeadless bool) { if !isHeadless { return diff --git a/test/cloud-slack-dev-e2e/cloud_slack_dev_e2e_test.go b/test/cloud-slack-dev-e2e/cloud_slack_dev_e2e_test.go index d485be7f0..d86c71843 100644 --- a/test/cloud-slack-dev-e2e/cloud_slack_dev_e2e_test.go +++ b/test/cloud-slack-dev-e2e/cloud_slack_dev_e2e_test.go @@ -77,8 +77,9 @@ func TestCloudSlackE2E(t *testing.T) { err := envconfig.Init(&cfg) require.NoError(t, err) - cfg.Slack.Tester.CloudBasedTestEnabled = false // override property used only in the Cloud Slack E2E tests - cfg.Slack.Tester.RecentMessagesLimit = 3 // this is used effectively only for the Botkube restarts. There are two of them in a short time window, so it shouldn't be higher than 5. + cfg.Slack.Tester.CloudBasedTestEnabled = false // override property used only in the Cloud Slack E2E tests + cfg.Slack.Tester.RecentMessagesLimit = 3 // this is used effectively only for the Botkube restarts. There are two of them in a short time window, so it shouldn't be higher than 5. + cfg.Slack.Tester.MessageWaitTimeout = 3 * time.Minute // downloading plugins on restarted Agents, sometimes takes a while on GitHub runners. var botkubeDeploymentUninstalled atomic.Bool botkubeDeploymentUninstalled.Store(true) // not yet installed diff --git a/test/commplatform/slack_tester.go b/test/commplatform/slack_tester.go index 143bf706d..d47ff9892 100644 --- a/test/commplatform/slack_tester.go +++ b/test/commplatform/slack_tester.go @@ -44,7 +44,7 @@ type SlackConfig struct { CloudTesterAppToken string `envconfig:"optional"` CloudTesterName string `envconfig:"default=tester2"` RecentMessagesLimit int `envconfig:"default=6"` - MessageWaitTimeout time.Duration `envconfig:"default=180s"` + MessageWaitTimeout time.Duration `envconfig:"default=50s"` } type SlackChannel struct {