Skip to content
This repository was archived by the owner on Jun 18, 2022. It is now read-only.

Commit

Permalink
Merge pull request #83 from cjellick/test-fixes
Browse files Browse the repository at this point in the history
Test fixes
  • Loading branch information
Craig Jellick authored Nov 3, 2016
2 parents 8c247ad + f3631c4 commit 390441b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docker pull ibuildthecloud/helloworld:latest

PACKAGES=". $(find -name '*.go' | xargs -I{} dirname {} | cut -f2 -d/ | sort -u | grep -Ev '(^\.$|.git|.trash-cache|vendor|bin)' | sed -e 's!^!./!' -e 's!$!/...!')"

go test -race -cover -timeout=30s -tags=test ${PACKAGES}
go test -race -cover -timeout=3m -tags=test ${PACKAGES}

cd tests
find -depth -name __pycache__ -o -name "*.pyc" -exec rm -rf {} \;
Expand Down
15 changes: 1 addition & 14 deletions tests/tests/test_docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,6 @@
from cattle.plugins.host_info.main import HostInfo


@pytest.fixture(scope='module')
def pull_images():
client = docker_client()
images = [('ibuildthecloud/helloworld', 'latest'),
('rancher/agent', 'v0.7.9'),
('rancher/agent', 'latest')]
for i in images:
try:
client.inspect_image(':'.join(i))
except APIError:
client.pull(i[0], i[1])


@if_docker
def test_volume_activate(agent):

Expand Down Expand Up @@ -1584,7 +1571,7 @@ def ping_post_process_state_exception(req, resp, valid_resp):


@if_docker
def test_ping(agent, pull_images, mocker):
def test_ping(agent, mocker):
mocker.patch.object(HostInfo, 'collect_data',
return_value=json_data('docker/host_info_resp'))

Expand Down

0 comments on commit 390441b

Please sign in to comment.