Skip to content

Commit

Permalink
fix: Skip test_invoke_with_docker_network_of_host_in_env_var on windo…
Browse files Browse the repository at this point in the history
…ws (aws#1054)
  • Loading branch information
jfuss authored Mar 19, 2019
1 parent 655c4a7 commit fc9de39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/local/invoke/test_integrations_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import shutil
import os
import copy
from unittest import skipIf
import tempfile
from unittest import skipIf

from nose_parameterized import parameterized
from subprocess import Popen, PIPE
Expand All @@ -13,10 +13,11 @@

from tests.integration.local.invoke.layer_utils import LayerUtils
from .invoke_integ_base import InvokeIntegBase
from tests.testing_utils import IS_WINDOWS, RUNNING_ON_TRAVIS, RUNNING_TEST_FOR_MASTER_ON_TRAVIS

# Layers tests require credentials and Travis will only add credentials to the env if the PR is from the same repo.
# This is to restrict layers tests to run outside of Travis and when the branch is not master.
SKIP_LAYERS_TESTS = os.environ.get("TRAVIS", False) and os.environ.get("TRAVIS_BRANCH", "master") != "master"
SKIP_LAYERS_TESTS = RUNNING_ON_TRAVIS and RUNNING_TEST_FOR_MASTER_ON_TRAVIS

try:
from pathlib import Path
Expand Down Expand Up @@ -233,6 +234,8 @@ def test_invoke_with_docker_network_of_host(self):

self.assertEquals(return_code, 0)

@skipIf(IS_WINDOWS,
"The test hangs on Windows due to trying to attach to a non-existing network")
def test_invoke_with_docker_network_of_host_in_env_var(self):
command_list = self.get_command_list("HelloWorldServerlessFunction",
template_path=self.template_path,
Expand Down
6 changes: 6 additions & 0 deletions tests/testing_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os
import platform

IS_WINDOWS = platform.system().lower() == 'windows'
RUNNING_ON_TRAVIS = os.environ.get("TRAVIS", False)
RUNNING_TEST_FOR_MASTER_ON_TRAVIS = os.environ.get("TRAVIS_BRANCH", "master") != "master"

0 comments on commit fc9de39

Please sign in to comment.