diff --git a/percy/environment.py b/percy/environment.py index 8233823..5724eab 100644 --- a/percy/environment.py +++ b/percy/environment.py @@ -251,7 +251,7 @@ def commit_sha(self): @property def parallel_nonce(self): - return os.getenv('CIRCLE_WORKFLOW_WORKSPACE_ID') or os.getenv('CIRCLE_BUILD_NUM') + return os.getenv('CIRCLE_WORKFLOW_ID') or os.getenv('CIRCLE_BUILD_NUM') @property def parallel_total_shards(self): diff --git a/tests/test_environment.py b/tests/test_environment.py index 4f4cbbd..cbde924 100644 --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -322,7 +322,7 @@ def setup_method(self, method): os.environ['CIRCLE_BRANCH'] = 'circle-branch' os.environ['CIRCLE_SHA1'] = 'circle-commit-sha' os.environ['CIRCLE_BUILD_NUM'] = 'circle-build-number' - os.environ['CIRCLE_WORKFLOW_WORKSPACE_ID'] = 'circle-workflow-workspace-id' + os.environ['CIRCLE_WORKFLOW_ID'] = 'circle-workflow-id' os.environ['CIRCLE_NODE_TOTAL'] = '3' os.environ['CI_PULL_REQUESTS'] = 'https://github.com/owner/repo-name/pull/123' self.environment = percy.Environment() @@ -337,8 +337,8 @@ def test_commit_sha(self): assert self.environment.commit_sha == 'circle-commit-sha' def test_parallel_nonce(self): - assert self.environment.parallel_nonce == 'circle-workflow-workspace-id' - del os.environ['CIRCLE_WORKFLOW_WORKSPACE_ID'] + assert self.environment.parallel_nonce == 'circle-workflow-id' + del os.environ['CIRCLE_WORKFLOW_ID'] assert self.environment.parallel_nonce == 'circle-build-number' def test_parallel_total(self):