diff --git a/.github/workflows/smb_acceptance.yml b/.github/workflows/smb_acceptance.yml index 6f7765d1aecb..ea43e79884a0 100644 --- a/.github/workflows/smb_acceptance.yml +++ b/.github/workflows/smb_acceptance.yml @@ -48,12 +48,14 @@ jobs: services: smb: image: ${{ matrix.docker_image }} - ports: ["445:445"] + ports: + - 445:445 + - 139:139 env: SMB_USERNAME: acceptance_tests_user SMB_PASSWORD: acceptance_tests_password options: >- - --health-cmd smbclient -U 'acceptance_tests_user%acceptance_tests_password' -L 127.0.0.1 -p 2048 + --health-cmd smbclient -U 'acceptance_tests_user%acceptance_tests_password' -L 127.0.0.1 --health-interval 10s --health-timeout 5s --health-retries 5 @@ -117,8 +119,8 @@ jobs: # Note: rspec retry is intentionally not used, as it can cause issues with allure's reporting # Additionally - flakey tests should be fixed or marked as flakey instead of silently retried run: | - docker run -d --rm --publish 127.0.0.1:2048:445 --publish 127.0.0.1:2024:139 smb-samba:v1 --name smb-acceptance - smbclient -U 'acceptance_tests_user%acceptance_tests_password' -L 127.0.0.1 -p 2048 + docker run -d --rm --publish 445:445 --publish 139:139 smb-samba:v1 --name smb-acceptance + smbclient -U 'acceptance_tests_user%acceptance_tests_password' -L smb-acceptance bundle exec rspec spec/acceptance/smb_spec.rb - name: Kill Docker Container diff --git a/test/smb/Dockerfile b/test/smb/Dockerfile index ceb513de6b09..6645b21abec5 100644 --- a/test/smb/Dockerfile +++ b/test/smb/Dockerfile @@ -3,6 +3,8 @@ FROM ubuntu:22.04 AS build MAINTAINER metasploit-framework WORKDIR /opt +EXPOSE 445 139 + # Switch shells to support ANSI-C quoting: # https://stackoverflow.com/questions/33439230/how-to-write-commands-with-multiple-lines-in-dockerfile-while-preserving-the-new SHELL ["/bin/bash", "-c"]