Skip to content

Commit

Permalink
debugging samba host var in smb_os_share test
Browse files Browse the repository at this point in the history
  • Loading branch information
telamonian committed Apr 14, 2020
1 parent 2ae74df commit 67af6fb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
20 changes: 12 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ build: off
services:
- docker

# stack: docker, jdk 1.8, node 12, python 3.7

# runs before repo checkout
init:
# set the python version
Expand All @@ -17,40 +19,42 @@ init:
- python -m pip install --upgrade pip

# set the node version
- ps: Install-Product node 12
# - ps: Install-Product node 12

# install yarn globally
- npm install -g yarn
# - npm install -g yarn

install:
# set up a windows file share named "test"
- ps: ci/enable_os_share_windows.ps1
- ps: ci/create_os_share_windows.ps1

# set up a local s3_proxy server
- bash -c "ci/s3_local.sh -d; sleep 5"
- ps: Start-Job { bash -c "ci/s3_local.sh -d" }
- ps: bash -c "sleep 15"
- curl http://127.0.0.1:9000/

# install python deps
- pip install -e .[dev]

# install js deps
- yarn
# - yarn

# print all env vars
- ps: gci env:* | sort-object name

test_script:
# uncomment to allow remote login to windows ci vm via rdp
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

# lint the python code
- python -m flake8 jupyterfs setup.py
# - python -m flake8 jupyterfs setup.py

# lint the js code
- yarn lint
# - yarn lint

# test the python code
- python -m pytest -v jupyterfs/tests --cov=jupyterfs --cov-branch

# test the js code
- yarn test
# - yarn test
1 change: 0 additions & 1 deletion ci/s3_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ curl -L https://github.com/gaul/s3proxy/releases/download/s3proxy-${S3PROXY_VERS
# run s3proxy as a background job
if [ "$detach" = "-d" ]; then
java -jar s3proxy --properties s3proxy.conf &
disown
else
java -jar s3proxy --properties s3proxy.conf
fi
Expand Down
12 changes: 9 additions & 3 deletions jupyterfs/tests/test_pyfilesystem_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
test_hostname_smb_docker_share = 'TESTNET'
test_name_port_smb_docker_share = 3669

test_smb_port_smb_os_share = 445
test_host_smb_os_share = socket.gethostbyname_ex(socket.gethostname())[2][-1]
test_smb_port_smb_os_share = None

_test_file_model = {
'content': test_content,
Expand Down Expand Up @@ -131,7 +132,11 @@ def _createContentsManager(self):
class TestPyFilesystemContentsManager_smb_docker_share(_TestBase):
"""(mac/linux only. future: windows) runs its own samba server via
py-docker. Automatically creates and exposes a share from a docker
container
container.
Manual startup of equivalent docker:
docker run --rm -it -p 137:137/udp -p 138:138/udp -p 139:139 -p 445:445 dperson/samba -p -n -u "smbuser;smbuser" -w "TESTNET"
"""
_rootDirUtil = samba.RootDirUtil(
dir_name=test_dir,
Expand Down Expand Up @@ -181,6 +186,7 @@ class TestPyFilesystemContentsManager_smb_os_share(_TestBase):
"""
_rootDirUtil = samba.RootDirUtil(
dir_name=test_dir,
host=test_host_smb_os_share,
smb_port=test_smb_port_smb_os_share
)

Expand All @@ -199,7 +205,7 @@ def teardown_method(self, method):

def _createContentsManager(self):
kwargs = dict(
host=socket.gethostbyname(socket.gethostname()),
host=test_host_smb_os_share,
hostname=socket.getfqdn(),
passwd=samba.smb_passwd,
share=test_dir,
Expand Down

0 comments on commit 67af6fb

Please sign in to comment.